Google | SWE | Oct 2019 | CA
Anonymous User
2198

Round 1:

  • Given an array, and a target, the question was whether the sum that can be returned in this array can be a target. Follow up is how many such subsets are returned, and moreover, what if multiply or divide, can you return sublists of those values that can be equal to target value.
    Eg Given [3,5,6,7,3,2,6,1] t=9
    Return [5,3,1], [7,2] etc.

Follow up [10,3,5,2,11,12,15] t = 6 if mutliply
Return [3,2]

Round 2:

  • Given a sorted circular linked list (one-way), and a random node in the list, there is also a target number, request to insert the list to ensure the order, duplicate if any, followup two of the numbers are anti- What to do
    eg 1->3-> 5-> 7-> 1, node=3, num=4
    Return 4->5->7->1->3->4

Round 3:

  • Given a digital input stream, The average value of the last last k value is required, and in the calculation, it is required to remove top 5% and bottom 5% of the k numbers, interviewer wanted linear time.

Round 4:

Comments (2)