LeetCode
Find Leaves of Binary Tree
Click
here
for an explanation.