in reply to Challenge: Sorting Sums Of Sorted Series

The fact that you have 16 results but only require 12 units of memory means that you only have to output the values ordered, not store the ordered results set?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"
  • Comment on Re: Challenge: Sorting Sums Of Sorted Series

Replies are listed 'Best First'.
Re^2: Challenge: Sorting Sums Of Sorted Series
by Limbic~Region (Chancellor) on Feb 02, 2010 at 17:49 UTC
    BrowserUk,
    Yes. I am always amazed at how opaque my attempts at being clear can be. Produce the ordered output without storing it all in memory first.

    I realize that there is little practical application to the problem abstracted as far as it is. ikegami's real use case was very specific but didn't make for a good challenge - besides, I didn't have all the details.

    Cheers - L~R