Singly Linked List Quicksort

This is a discussion on Singly Linked List Quicksort within the C++ Programming forums, part of the General Programming Boards category; Is there a way to sort via a quicksort a singly linked list....

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    23

    Singly Linked List Quicksort

    Is there a way to sort via a quicksort a singly linked list.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Everything's possible, but I believe it would be alot easier to use a double linked list.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    23
    This is the basic sturcture for my sturcutre for my linked list, I am in desperate need of some help on an algortim that could quicksort by the year. Ive tried many things but I can't get an algoritm to work, any links to examples or code will be of great help. Ive tried google, I've tried books but none have helped me, Thank you.

    class Part
    {
    public:
    string Make;
    string Model;
    string PartType;
    int Year;
    string PartCode;
    float Cost;

    Part* next;

    Part(string, string, string, int, string, float, Part*);
    ~Part();
    private:
    };

  4. #4
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Code tags are a beautiful thing. I agree with magos that a double would be easier.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reverse function for linked list
    By Brigs76 in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2006, 11:01 AM
  2. Anyone good with linked list.....I am not....
    By chadsxe in forum C++ Programming
    Replies: 11
    Last Post: 11-10-2005, 02:48 PM
  3. How can I traverse a huffman tree
    By carrja99 in forum C++ Programming
    Replies: 3
    Last Post: 04-28-2003, 06:46 PM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 02:27 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 11:21 PM

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