Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Numeric sorting WITHOUT <=>

by ria1328 (Initiate)
on Oct 09, 2012 at 22:22 UTC ( #998094=note: print w/ replies, xml ) Need Help??


in reply to Re: Numeric sorting WITHOUT <=>
in thread Numeric sorting WITHOUT <=>

Not my idea, its for a class. That might work but he hinted at using nested loops to numerically sort the keys.


Comment on Re^2: Numeric sorting WITHOUT <=>
Re^3: Numeric sorting WITHOUT <=>
by AnomalousMonk (Monsignor) on Oct 09, 2012 at 22:31 UTC

    Ah: "Give a man a fish and he will eat for a day. Tell a man to beat the fish to death with a baseball bat and he will happily use a fishing hook and line for all the rest of his days."

Re^3: Numeric sorting WITHOUT <=>
by dsheroh (Parson) on Oct 10, 2012 at 09:40 UTC
    If he's talking about nested loops, then you're probably not supposed to use the Perl sort function at all, but instead to implement a sorting algorithm from scratch. Hopefully, then, the class has already covered at least one sorting algorithm for you to implement. If not, google can provide explanations of how several sorting algorithms work, then it's just a matter of translating the algorithm's description into Perl code.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998094]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2014-08-30 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls