Recursion And Backtracking Leetcode Solutions Python