recommendations on sorting algorithms

This is a discussion on recommendations on sorting algorithms within the C++ Programming forums, part of the General Programming Boards category; hey, I was just wondering if someone could recommend a fast sorting array, sorting linked list of very varying size... ...

  1. #1
    btq
    btq is offline
    julie lexx... btq's Avatar
    Join Date
    Jun 2002
    Posts
    161

    recommendations on sorting algorithms

    hey, I was just wondering if someone could recommend a fast sorting array, sorting linked list of very varying size...
    that would be aaabbsoulutley lovly..
    I've searched around on the net and on the board but didn't find anthing concrete..
    thanks a bunch...

    /btq

  2. #2
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    Quick Sort hehe...have fun coding it.
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  3. #3
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    std::sort
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    In general situations, QuickSort is the best sorting algorithm.

    Kuphryn

  5. #5
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    Quicksort isn't so quick on linked lists, it requires O(1) random access for O(N*lg(N)) performance (hence why std::list has a sort member function for std::list, rather than just the free function std::sort, like for vectors) Mergesort works nicely on linked lists, however.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting algorithms, worst-case input
    By Leftos in forum C++ Programming
    Replies: 17
    Last Post: 06-15-2009, 01:33 PM
  2. Need help with linked list sorting function
    By Jaggid1x in forum C Programming
    Replies: 6
    Last Post: 06-02-2009, 02:14 AM
  3. Sorting Algorithms
    By ashir30000 in forum C++ Programming
    Replies: 9
    Last Post: 05-21-2009, 09:27 AM
  4. Sentinel in sorting algorithms
    By Albinoswordfish in forum C Programming
    Replies: 2
    Last Post: 12-17-2008, 02:21 AM
  5. Sorting Algorithms with Time
    By silicon in forum C++ Programming
    Replies: 3
    Last Post: 05-03-2005, 11:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21