LeetCode Problem 872: Leaf-Similar Trees