Recursion In Python Leetcode Solution 862