Google Phone Screen - A well deserved rejection

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-11-18Added By Anonymous
Source: Link

Company: Google
Role: l3, l4
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Got the same question as this https://leetcode.com/discuss/interview-question/1682632/google-phone-screen-number-of-islands-in-a-tree

I gave a horrible approach of maintaining the connected nodes (left, right, children) even though the interviewer gave a pointer that "do you really need to do this".

Wasn't able to come up with a single tree traversal approach before I wrote the code. Once I was done writing the code, I gave the traversal approach but there was no time to write the code.

Haven't received feedback yet, but pretty sure it will be a rejection and quite frankly it's well deserved considering the level of Google it was a pretty straightforward question.

Comments