Should not increment the iterator since once a node is inserted, it is removed from n.children; so the length of n.children actually decreases in the loop.