Google | Phone | Product Stream
Anonymous User
1966

Hello Community,
Recently I gave the phone-screen interview for Google.
Position- SWE, new-grad, Bangalore [India]

Question- Design a data structure with get() and insert(int val) function for a stream of integers which can give you the product of last k terms from end.

Ex. k=3;
insert(4), insert(5), insert(10), insert(-1), get(), insert(3), get()
Output:- [NULL, NULL, NULL, NULL, -50, NULL, -30]

Then interviewer asked me some follow-ups and then i coded it. After it there was one more question of leetcode medium, which i don't remember exactly (will update the post later). I told him the approach and as we were running out of time so he did not ask me to code it.

Verdict:- Selected

I have my onsite interview after 3 weeks. It would be great help if someone can guide me about how to use these 3 weeks effectively before my onsite. Till now I have completed 420 Leetcode quesion including 280 medium, 50 hard and 90 easy.
Thanks a lot in advance :)

Comments (2)