Dynamic programming

Question

Solution

http://pastebin.com/1R543whN

Thing is that I can’t formulate the solution from editorial or given link above can anyone explain
in detail with recursive solution also.

1 Like