Given the root of a binary tree, collect a tree's nodes as if you were doing this: collect and remove all leaves, repeat until the tree is empty. Return a list of lists of node values, where each…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.