← Questions

Print each tree node's level and whether it is balanced

0
NetflixCodingLast asked Aug 2026

A coding interview question asked in Netflix's coding / problem solving round, last asked Aug 2026. It tests trees, dfs and recursion.

You get a binary tree stored as a zero-based level-order array: the children of index i are at 2i + 1 and 2i + 2, and None marks a missing node. For every node, report its level (the root is level 0) and whether the subtree rooted at it…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

trees · dfs · recursion

Your code and the AI tutor open when you unlock this question.