Need help for the recursive dp code
Can someone provide the solution and recursive code for the problem link, thanks in advance for helping out.