Trying the not so smart solution in ruby, with dynamic programming
Finishing it?