Current status: 2018 new grad, ECE, M.Eng, Canada
Technical phone interview (45 mins)
The interviewer was late, 10 minutes and actually the interview last around 40 minutes in total. Before coding, the interviewer let me give an introduction, make sure everything works well on google doc and emphasize that they care more about your thought process. It took around 10 minutes.
The first coding question is quite simple, given an array and move all zeros to the end.
e.g. 2, 4, 0, 4, 0, 3, 1 -> 2, 4, 4, 3, 1, 0, 0The order of non-zero values does not matter, as long as you move all zeros to the right side. Then I finished it quickly and verbally run a test case.
The second question is that we have a list of trees (roots are given), check whether all of them are similar. Whether two trees are similar depends on the leaves from left to right.
e.g.
1
2 3
4 5 6
If we print leaves from left to right we will get 4, 5 ,6
1
2 6
3
4 5
If we print leaves from left to right we will get 4, 5, 6
Therefore, the two trees above are similar.Trees are balanced and I used a stack to do DFS and get the result of printing leaves from left to right. The interviewer also asked me the time complexity and space complexity for the two coding questions above.
In the last 10 minutes, the interviewer let me ask some questions. I asked some simple questions like the work-life balance in google, his team and work, etc.
Result: 2 weeks later, recruiter told me there would be another phone interview for me.