News for hackers. Stuff that matters.
Re:Algorithms, A Dropbox Challenge and Dynamic Programming by btilly on Sunday February 27, 2011 @02:40AM (#2267484)
No, I didn't miss that part. I just didn't believe it.

See http://en.wikipedia.org/wiki/Dynamic_programming#Dynamic_pro.... You will find that having a table is only one of several options. The approach that I took fits the description of the second class of technique there, going bottom up.

Re:Algorithms, A Dropbox Challenge and Dynamic Programming by klochner on Sunday February 27, 2011 @02:54AM (#2267503)
I was kidding :)

seriously though, what's up with the sort() call?

Re:Algorithms, A Dropbox Challenge and Dynamic Programming by btilly on Sunday February 27, 2011 @02:57AM (#2267510)
what's up with the sort() call?

The spec for the problem he was actually trying to solve said that you needed to provide the set of activities in sorted order. The list is generated in no particular order, so I sorted them before returning them. (A Python array sort sorts the array in place.)