Find the Maximum Number of Fruits Collected | Leetcode 3363 | DP