
13 Jul
2005
13 Jul
'05
11:29 a.m.
On 7/13/05, ChrisK
Sort the list of integers, highest at the front of the list. (And perhaps remove duplicates with nub)
The first time I wrote in the comments that 'partition' takes a "decreasing list of integers..." and then I decided to drop "decreasing". Weakest precondition :)
When you pop the first element you can already compute the range of quantity you will need,
Is that really faster? I wouldn't be sure without profiling.. -- regards, radu http://rgrig.blogspot.com/