Google | SWE | Sunnyvale | Nov 2019 [Reject]

Background: Finishing up my Ph.D.
Role: Ph.D. ML Engineer
Date: 11/12/2019

Onsite

Round 1:

  • Closest XY pair in a grid
    Solved using bfs o(mmnn) and suggested early pruning ideas. coded and then interviewer asked further optimization. suggested a dfs and dp approach to bring it down to o(mn) didn't have time to code it.

Round 2:

  • Given a number n find the first n non confusing numbers. https://leetcode.com/problems/confusing-number-ii/
    Suggested a check function for every number until we have N non confusing numbers. follow up to improve this included bactracking to generate confusing number till N. Did not code the optimal solution as we ran out of time.

Round 3:

  • Implement a generic queue using linked list. Implemented a queue with all edge cases covered! This question was interesting since the interviewer later asked me if i am missing something. He said my API misses lots of things like: iterator etc. I just did enqueue, dequeue, and len. He said I don't know of something called stopper object can be used to handle null case (i returned float('inf') when empty queue). He was also looking at my knowledge of tempelates. In general, in python that is not a problem due to auto-type checking.

  • https://leetcode.com/problems/largest-rectangle-in-histogram/ I have seen this question before so vaguely remember using monotonic stack. suggested the optimal solution with monotonically increasing stack for this question but didn't have time to code.

Round 4:

  • Given a large file, process it in chunks and omit the black listed words from the file. Added as many cases as he asked until we ran out of time.

Round 5:

  • HR questions and googlyness about inclusiveness, positivity, leadership etc.

Thoughts: I feel i might get rejected since these days they expect you to finished coding two questions. That being said, I don't think I bombed any round so I might have a chance. In general, I felt the interviews were nothing crazt, given little more time I could've done optimal solutions of all the questions.

Any thoughts or comments appreciated.

Comments (8)