I have essentially an array sorting problem. I know there are multiple algorithms for this but I'm looking for a FORMULA based in the FASTEST algorithm:
If I own cars in a garage with 100 spaces.
i) Whats the minimum moves to order by age?
ii) If I buy another car how long does it take to add to the collection, preserving order.
iii) How does i) and ii) change if I order by color and have X colors?
Thanks.
Array sorting formula.
Started by joninty, Apr 14 2010 05:59 AM
4 replies to this topic
#1
Posted 14 April 2010 - 05:59 AM
|
|
|
#2
Posted 14 April 2010 - 02:53 PM
#3
Posted 16 April 2010 - 03:49 AM
Cheers but I had read this already. I'm interested in a formula that describes the minimum possible moves.
#4
Posted 16 April 2010 - 07:41 AM
It is dependent on the algorithm used, and for some algorithms the current ordering. In general, sorting algorithms are at least O(n log(n)).
#5
Posted 18 April 2010 - 08:47 PM


Sign In
Create Account

Back to top









