Given a binary tree, remove all nodes that have only one child, transforming it into a full binary tree where every node has either 0 or 2 children. Return the root of the modified tree.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.