a guest Oct 17th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  2. # 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
  4. # Example:
  5. # Input: [0,0,0,2,3,1,0,5]
  6. # Output: [(0,1), (0,2), (0,3), (0,5)]
  8. # Input: [0,0,0,1,1,2,0,0]
  9. # Output: [(0,1), (0,1), (0,2)]
  11. # 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.
  13. # Example:
  14. # Input: "burg" ["Burger King", "Wahlburger", "Bob's Burgers", "Tim Hortons"]
  15. # Output: ["Burger King", "Bob's Burgers", "Wahlburger"]
  17. # Input: "burg" ["Burger King", "Wahlburger", "Bob's Burgers", "Burgeranator"]
  18. # Output: ["Burger King", "Bob's Burgers", "Burgeranator", "Wahlburger"]
  21. # 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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand