Leetcode Maximum Recursion Python Practice