Given a binary tree, collect and remove all leaf nodes repeatedly until the tree is empty, returning the values collected at each step as a list of lists.
Enable JavaScript for the full StreamPrep guide.