Google | L3 Cloud | Sunnyvale

  1. open ended question
    design a logging system
    there are some params in the log: thread id, start time, end time
    the logs should be sorted based on start time
  2. find peak in an array and there might be duplicates in the input
    example [1 2 3 4 4 5 2 1], output: the peak is 5 (index at 5)
  3. given an integer array and a target value. find a value x . and all the values that are smaller or equal to x remain the same, but all the values larger than x will be changed to x . we need to find the x so that the sum of the array is closest to given target value
  4. I don’t remember the question, but related to searching paths in an array