Author: Thomas Dimson
Date: Jul 13, 2008 16:11
Martin wrote: I'm confused about question 3. The solution really trivial: just take the sum of the K smallest elements in a (which can be done in O(n lg n) time)? What about a block size of 2 in [-5,2,-4,1,-3], the 2 smallest yields [[-5],[-4]] = -9 but the maximum is [[-5],[-4,1,-3]] = -11
|