Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Given a list of employees with corresponding teams, find the maxmimum matching between pairs of employees so that no pair contains employees of the same team
- # Example:
- # Input: [0,0,0,2,3,1,0,5]
- # Output: [(0,1), (0,2), (0,3), (0,5)]
- # Input: [0,0,0,1,1,2,0,0]
- # Output: [(0,1), (0,1), (0,2)]
- # Given a search term and a list of business names, return a list of businesses wherein any word in the name of the business has the search term as a prefix followed by the list of businesses that have the search term as a substring. The first part of the list should be sorted based on the index of the word in which the search term appears as a prefix and the second part should be sorted based on the character index of where the search term appears as a substring.
- # Example:
- # Input: "burg" ["Burger King", "Wahlburger", "Bob's Burgers", "Tim Hortons"]
- # Output: ["Burger King", "Bob's Burgers", "Wahlburger"]
- # Input: "burg" ["Burger King", "Wahlburger", "Bob's Burgers", "Burgeranator"]
- # Output: ["Burger King", "Bob's Burgers", "Burgeranator", "Wahlburger"]
- # Given a list of tuples of (party size, wait time) and a tableSize of the next table that just opened up, return which party should be seated next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement