Home » Lifehacks

Animated Sorting Algorithm – Which is best ? [ Math Fun ]

Ever wondered which sorting algorithm of Insertion, Selection, Bubble, Shell, Merge, Heap, Quick and Quick3 ? Well it might take some logic and you got to be good in mathematics but what I am going to show you next will just make you smile.

sorting-alogrithm

This guys Dmartin has developed a small tool which allows you to play with all the algorithm at once after you select all the paramters. According to him “There is no algorithm that has all of these properties, and so the choice of the optimal sorting algorithm depends on the application.”

Pretty much right. It all depends whats your usage and requirement. He also explained the properties of an  ideal sorting algorithm :

  • Stable: Equal keys aren’t reordered.
  • Operates in place, requiring O(1) extra space.
  • Worst-case O(n·lg(n)) key comparisons.
  • Worst-case O(n) swaps.
  • Adaptive: Speeds up to O(n) when data is nearly sorted or when there are few unique keys.

This is worth noting down. So if you want to give it a try check out the Animated Sorting Algo

Tagged with: | Need more help ? Ask your Questions at our Support Center | Follow us on Twitter @TSNW or Facebook
Facebook Share Print This Post

Posted on 8th September 2008 by Ashish Mohta , A Professional Tech blogger, Editor and Writer who talks about solving day to day problems of people who use computer. He also writes on How to use the applications like Office, PC tips, Online tools,Browsers and more. All posts by Ashish Mohta | Connect with me @ Twitter | Linkedin | Facebook | Stumble

Leave your response!

Be nice. Keep it clean. Stay on topic. No spam.