kennethk,
As per update, fixed the bug in solution_1

I still get incorrect results:

my @list1 = qw(2 3 5 7 11 13 17 19 23 29); my @list2 = qw(1 1 2 3 5 8 13 21 34 55 89); __DATA__ 3 4 4 4 5 6 6 8 8 11 12 14 6 6 7 8 10 13 16 18 18 20 24 8 8 9 10 12 15 20 24 26 28 30 12 12 13 14 16 19 24 32 37 39 41 14 14 15 16 18 21 26 34 45 47 58 18 18 19 20 22 25 30 38 51 60 62 20 20 21 22 24 27 32 40 53 66 68 24 24 25 26 28 31 36 44 57 72 74 30 30 31 32 34 37 42 50 63 78 84 92 94 96 100 102 106 108 112 118

If IO is a bottle neck, then a method that can reduce calls to IO is a better method

Actually, unless I am measuring algorithms that reduce IO, I avoid doing IO in my Benchmark all together. After verifying that all options produce correct results on a sufficiently varied data set, I remove all print statements. It would be interesting to see what the bench results are with a corrected algorithm where no solution did IO.

Cheers - L~R


In reply to Re^4: Challenge: Sorting Sums Of Sorted Series by Limbic~Region
in thread Challenge: Sorting Sums Of Sorted Series by Limbic~Region

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.