Meta E5 Phone Screen | rejected
Anonymous User
778
  1. 496 followed by "Find the number of elements in an inclusive range in a sorted list".

I solved the first part easily and the second part as well, but forgot to handle duplicates in the list. Once prompted by the interviewer I solved that easily as well.

  1. Given two arrays of departure prices and return prices find the minimum total cost of a trip (return has to be on the same day or after departure). Eg: D = [10, 7, 8 , 8, 9] and R = [8, 10, 7, 8, 9] -> 14 (depart on day 2 and return on day 3).

I solved this in O(n) time and O(n) space, could not get the O(1) space solution.

Rejection seems harsh based on this performance or this now the bar?

Comments (7)