Problem 623 · Medium

Add One Row to Tree

Insert a new row of nodes at a given depth, attaching the original subtrees to the new nodes on the correct side. The visual shows the existing levels shifting down and the new row appearing between them.

Open the interactive visualisation