Perfect Binary Tree Leetcode Question