Educative

Approach given for memoisation is wrong

dp[currentIndex][sum1] is always equal to null .
On drawing the recursive graph it can be observed.

Rather we should check for dp[currentIndex][abs(sum - sum1)]
Please correct the solution.

What problem we are discussing here, can you please share the link?