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.
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?