Leetcode Question On Recursion