blahblah99
Platinum Member
A while back I posted this question and got some really good responses...however, I just recently came up with an EVEN FASTER way....
The problem is this - you have an array of 1 million elements and want to pick the top 10 largest elements in the array. What's the fastest way to implement the sort?
The 10-iteration bubble sort is slow compared to what I have. 😛
For comparison,
10-iteration bubble sort = ~17 seconds.
my ingenuity sort = <1 second on the same computer, typically 0.5-0.8 seconds.
I dare you to come up with a faster sort algorithm! 😀 And if it's good, some Paypal will be involved!
The problem is this - you have an array of 1 million elements and want to pick the top 10 largest elements in the array. What's the fastest way to implement the sort?
The 10-iteration bubble sort is slow compared to what I have. 😛
For comparison,
10-iteration bubble sort = ~17 seconds.
my ingenuity sort = <1 second on the same computer, typically 0.5-0.8 seconds.
I dare you to come up with a faster sort algorithm! 😀 And if it's good, some Paypal will be involved!