Thread: Linked Lists + MergeSort....(how?)

  1. #1
    *this
    Join Date
    Mar 2005
    Posts
    498

    Smile Linked Lists + MergeSort....(how?)

    Hey guys, I was wondering if anyone could give me a clue on how to start programming a MergeSort function for linked lists (nodes with pointers to next node etc...) If someone could maybe provide some pseudocode, just to start me off, or any advice would help. I have already written a MergeSort function for an array of numbers but I'm stuck on a function for Linked Lists.

    Thanks,
    Josh
    Last edited by JoshR; 06-02-2005 at 06:59 PM.

  2. #2
    *this
    Join Date
    Mar 2005
    Posts
    498
    If anyone could help me out that would be great. I just want a quick answer, nothing too long. Just a pointer or a tip, so I can come up with my own implementation.

    Thanks,
    Josh

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    http://www.nist.gov/dads/HTML/mergesort.html
    All sorts of sorts
    And plenty of other useful information as well.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    *this
    Join Date
    Mar 2005
    Posts
    498
    Thanks a lot Salem

  5. #5

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linked Lists 101
    By The Brain in forum C++ Programming
    Replies: 5
    Last Post: 07-24-2004, 04:32 PM
  2. Map file formats and linked lists
    By Spitball in forum Game Programming
    Replies: 2
    Last Post: 03-04-2004, 11:32 PM
  3. Linked Lists Integer addition ? HELP Please??
    By green_eel in forum C Programming
    Replies: 3
    Last Post: 03-12-2003, 04:36 PM
  4. need help w/ linked lists
    By MKashlev in forum C++ Programming
    Replies: 11
    Last Post: 08-05-2002, 08:57 PM
  5. doubly linked lists
    By qwertiop in forum C++ Programming
    Replies: 3
    Last Post: 10-03-2001, 06:25 PM