Re: Sorting Algorithms

saomcol's Avatar, Join Date: Nov 2006
Newbie Member
how can I add a counter to the shell sort or insertion sort tha counts the number of compariisons that are made?
saomcol's Avatar, Join Date: Nov 2006
Newbie Member
I also need a prog to implement the tower of hannoi
saomcol's Avatar, Join Date: Nov 2006
Newbie Member
Thanx for your reply but I still need another answer:how can I modifyu the program to solve four pole tower of hannoi?
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by saomcol
Thanx for your reply but I still need another answer:how can I modifyu the program to solve four pole tower of hannoi?
Refer Tower of Hannoi.
oleber's Avatar, Join Date: Apr 2007
Go4Expert Member
Let me be bad, the Bubble Sort is the best algorithm for near sorted lists.

This means, if the elements are in there places or really near and you need the list sorted (is used in games and military area), Bubble Sort may be your choise since works locally. Most of the other algorithm work globally.
clocking's Avatar, Join Date: Jun 2007
Ambitious contributor
oh, if you try write the code to sort array of integer in C#. C# library supported it.