in reply to Re: Sort array according to a value in each element?
in thread Sort array according to a value in each element?

I gotta like two working solutions with examples demonstrating the Schwartzian Transform and Guttman Rosler Transform...

Now, having hardly any background in Computer Science-- bubble sorts are about my speed =)-- I have to woodshed for a while to figure out *why* they work-- and how to clean up a couple of warnings.

Thanks L~R and BrowserUK!
  • Comment on Re: Re: Sort array according to a value in each element?

Replies are listed 'Best First'.
Re^3: Sort array according to a value in each element?
by Roy Johnson (Monsignor) on May 24, 2004 at 22:07 UTC
    This Q&A might help enlighten you on how they work. They're not sort algorithms like bubblesort, they just manipulate the data so that the sort comparison looks at the right thing. The Schwartzian transform is explained there. The GRT just prefixes the data with the sorting information, then strips it off at the end. Essentially, it's a Schwartzian using a scalar as the array.

    The PerlMonk tr/// Advocate