Question catalog › Coding exercise › Google
Tree Node.
- Coding exercise
- Easy
- 10 min
Sign in to view the question description. Premium company questions require an active Premium plan.
How to approach this coding exercise
Clarify the inputs and expected output, explain an approach, and check edge cases. Discuss correctness and complexity before implementing. Use coding practice when your target role requires it.
Practice this question under interview conditions. Answer it out loud against a timer with an AI interviewer that asks follow-ups, then review the scored report.
Return to the question catalog · PM interview preparation guide
Practice guidance published by PMMockr Editorial. Company names are descriptive and do not imply affiliation.
Related coding exercises
- Given the root of a binary tree, return the length of the diameter of the tree.Google · Coding exercise · Medium
- Given a matrix with a rat, bread, cat, and obstacles, find a path from the rat to the bread that maximizes the minimum distance from cat.Google · Coding exercise · Hard
- Climbing StairsGoogle · Coding exercise · Easy
- Course ScheduleGoogle · Coding exercise · Medium
- Write SQL code to publish the Fibonacci series.Google · Coding exercise · Easy