okay, this is not exactly a #toyprogrammingchallenge but I hope you hate this problem as much as I did...
The problem is not just getting the right solution, but getting it in under the running timeout of 12000 ms. Good luck.
@Absinthe getting it under 12 seconds if the list is small is trivial, doing it on large enough lists might get tricky but to make the challenge useful youd have to specify the list of numbers that must be worked in under 12 seconds.
Obviously this also assume we all do the task on relatively similarly powered computers.
@Absinthe Oh I already speculated a solution (and a few other tweaks). Just too bust to try it out. In the middle of writing a specification and trying to learn bikeshed at the same time
@freemo would it help to know that the solution is based on memoization ?