[LeetCode] Find Leaves of Binary Tree

1 · · Feb. 12, 2022, 3:51 p.m.
366. Find Leaves of Binary Tree Given the root of a binary tree, collect a tree’s nodes as if you were doing this: Collect all the leaf nodes. Remove all the leaf nodes. Repeat until the tree is empty. ...