Ad
  • Default User Avatar

    It looks like a usual dynamic programming problem (and so the kata tags say as well), so it's the same as with any case of DP: look what simpler things are used in what way to produce more complex things. (And I've seen enough of this kind of problems for it to be pretty obvious for me.)

  • Custom User Avatar

    Hey, Can you tell me how did you come up with this solution? Or how did you plan the problem to solve it?