Sorting Algorithms

Discussion in 'Programming' started by saomcol, Nov 23, 2006.

  1. saomcol

    saomcol New Member

    Joined:
    Nov 23, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    how can I add a counter to the shell sort or insertion sort tha counts the number of compariisons that are made?
     
  2. saomcol

    saomcol New Member

    Joined:
    Nov 23, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    I also need a prog to implement the tower of hannoi
     
  3. saomcol

    saomcol New Member

    Joined:
    Nov 23, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Thanx for your reply but I still need another answer:how can I modifyu the program to solve four pole tower of hannoi?
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Refer Tower of Hannoi.
     
  5. oleber

    oleber New Member

    Joined:
    Apr 23, 2007
    Messages:
    37
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    Software Developer (Perl, C/C++ and Java)
    Location:
    Hamburg, Germany
    Home Page:
    http://oleber.freehostia.com/
    Let me be bad, the Bubble Sort is the best algorithm for near sorted lists:confused:.

    This means, if the elements are in there places or really near and you need the list sorted (is used in games :eek: and military area), Bubble Sort may be your choise since works locally. Most of the other algorithm work globally.
     
  6. clocking

    clocking New Member

    Joined:
    Jun 12, 2007
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    0
    oh, if you try write the code to sort array of integer in C#. C# library supported it.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice