Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1

by trippledubs (Deacon)
on Feb 06, 2019 at 19:38 UTC ( #1229493=note: print w/replies, xml ) Need Help??


in reply to Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1

yay.. did I do this right
td => sub { my @out; my $q = POE::Queue::Array->new; my @list = ( -52, -50 .. 50, 52, 0 ); push @out,($_,$_[2]) for $q->dequeue_next; Compare(\@out,\@output) or die "@out" if DO_CHECK; }

Replies are listed 'Best First'.
Re^2: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
by trippledubs (Deacon) on Feb 06, 2019 at 20:29 UTC
    not quite.. I'm trying to use a priority queue and queue with the right sorting priority, but it's coming up wrong so far

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2020-10-21 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (217 votes). Check out past polls.

    Notices?