I feel like my problem 2 solution is super close to the solving the following problem, but my code for some reason is not working out =(
Here is the link for the question: https://leetcode.com/contest/leetcode-weekly-contest-53/problems/max-area-of-island/
I'm off by 1, I'm getting 5 instead of 6. If you try to run it in an IDE, my print statement will show that for the last call of the recursion the value current is being reinitialized which is not what I wanted. Any ideas why?