Hi,
Sharing my onsite experience with Google. This was my first invite at Google onsite interview.
Telephonic round:
Already posted here: Google Telephonic
Onsite sound:
Advanced, Follow-up:
Calculate the same 0' subarray for 2D matrix.
**Example: **
[[0,0,0,0,0]
[1,0,0,1,0]
[1,0,0,0,0]
[0,0,1,1,1]]
[Difficulty: Easy] Object Oriented design: Given an XML document. Parse the document into an objects of tag.
[Difficulty: Medium] Variation of Course Schedule III Given list of schedule, with start time and end time, return the scheduled grouped by over lapped of schedule.
Example:
Input:
[[5,9],
[5,10],
[7,11],
[11, 12],
[3,4],
[2,5]]
Output:
[
[[5,9],[5,10],[7,11],[11, 12]],
[[3,4], [2,5]]
]
[Difficulty: Medium] Given a Binary Tree and given N, you need to find out if Nth index element is existing in Tree or Not. You need to do that in O(logN) time. Output is in True or False.
[Difficulty: Medium] Given a list of points in the 1st Quadrent of coordinate plane, you need to return the list of points that covers all other points.
Example:
Input: (1,2),(4,5),(6,7),(5,6),(8,9),(6,15),(1,12),(2,6),(9,9),(1,9),(4,6),(8,8),(9,8),(9,10),(8,10),(10,9),(11,9),(19,1),(15,3),(12,5),(14,4),(1,20),(20,1)
Output:(1,20), (6,15),(8,10),(9,10),(10,9),(11,9),(12,5),(14,4),(15,3),(19,1),(20,1)
See visually here
Overall Interview Experience:
It was a very easy interview round for me. The questions that were asked to me were within my capability and I was never stressed out during the interview. I had a lot of time to discuss alternative solutions.
Only point where I made a big tragic mistake was I was calculating 3 - 2 = 0, and this was pivotal in making a choice for a solution for question 3. I was thinking out loud, and miscalculating loud and neither my interviewer nor I corrected this mistake. And by the time I found what mistake I was making I ran out of time to code. But I explained my interviewer my approach.
I also took more than required time to understand question 4, but then came up with correct answer really quick. I felt like interviewer intentionally obfuscated the question.
Overall feedback:
Interviewers after Round 2 and Round 5 said they would love to work with me. During round 5, my interview was over at 3:00pm, but I was discussing my solution for more than an hour after interview because interviewer said he has never seen such solutions. He was trying hard to break my code, but all the test-cases passed his test. We together worked on a mathematical proof of my solution, and he was very delighted with our discussion.
Recruiter said that my 3rd round hit me hard. It was a very close call.
Round 4, I got feedback I could have used a better Data structure.
Extra appreciation for writing clean codes. They want me to try next time again.
Will try next time again.
My key priorities for preparing coding interviews:
My solutions coming soon.