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 gave the traversal approach but there was no time to write the code.
Haven't received a 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 straighforward question.
Comments (3)


