Problem 2773 · Medium

Height of Special Binary Tree

Walk the real child pointers with a stack of depths, ignoring the chain that joins the leaves; the deepest node count is the height.

Open the interactive visualisation