Problem 919 · Medium

Complete Binary Tree Inserter

Keep a queue of nodes with a free child slot so each insertion attaches at the next level-order position.

Open the interactive visualisation