Not because it was a terribly hard problem to solve but because there was too much room for speculation in the requirements.

Heh. I know what you mean. I think there is something here worth meditating on. Your solution to me had all the appearances of a hard sweated solution to stay within the box. He said "sort strings by part of the string", and you worked that angle. But thinking out of the box you can see that in fact its more like "construct a bunch of strings and then use part of them as a sort key" which when you observe that the construction really means joinging the very criteria we want to key by, its a lot clearer that a different approach entirely is better. And this is related to one of my rants of the past, if you stick too closely to a spec, then sometimes solutions become unfeasable. Changing the spec is ok so long as the end result is more or less the same.

This is partly because my mind still hadn't stopped thinking about "what ifs" and also because I am not as great a multi-tasker as I delude myself into believing.

Seems a good effort to me. And I know you have a lot on your mind. :-)


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi



In reply to Re: Re: Re^6: sort array by value in it by demerphq
in thread sort array by value in it by Anonymous Monk

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.