Merging Linked List in C

Discussion in 'C Programming' started by dmp, Dec 20, 2008.

  1. dmp

    dmp Guest

    How do I write a program to merge sort two linked list in C
     
    dmp, Dec 20, 2008
    #1
    1. Advertising

  2. dmp wrote:
    > How do I write a program to merge sort two linked list in C


    For starters, you need to decide what it is exactly that you need. I'd
    guess that this is either "merge-sort a linked list" or "merge two
    sorted linked lists". Your "merge sort two linked list" looks like a
    weird hybrid of the two and doesn't seem to make much sense.

    --
    Best regards,
    Andrey Tarasevich
     
    Andrey Tarasevich, Dec 20, 2008
    #2
    1. Advertising

  3. dmp

    MisterE Guest

    "dmp" <> wrote in message
    news:...
    > How do I write a program to merge sort two linked list in C


    Join then, then sort them?
     
    MisterE, Dec 20, 2008
    #3
  4. dmp

    CBFalconer Guest

    dmp wrote:
    >
    > How do I write a program to merge sort two linked list in C


    Look up my reply in the thread 'generic linklist'.

    --
    [mail]: Chuck F (cbfalconer at maineline dot net)
    [page]: <http://cbfalconer.home.att.net>
    Try the download section.
     
    CBFalconer, Dec 21, 2008
    #4
  5. dmp

    Richard Bos Guest

    dmp <> wrote:

    > How do I write a program to merge sort two linked list in C


    I'm sure your teacher gave you that information during the course of the
    year, so I suggest looking in either your notes, or, since your asking
    means you probably don't have any notes on any subject let alone
    relevant and understandable ones, in your school book.

    Richard
     
    Richard Bos, Dec 21, 2008
    #5
  6. dmp

    Phil Carmody Guest

    dmp <> writes:
    > How do I write a program to merge sort two linked list in C


    I would suggest starting with a computer equipped with a
    text editor. It's possible to start writing it on paper,
    but eventually you need to transfer it onto a computer,
    so I'd cut out the intermediate stage. Once you've got
    the editor up and running, you'll probably find that
    pressing keys on your keyboard will effect the insertion
    of text into the editor.

    Don't forget to save!
    HTH,
    Phil
    --
    I tried the Vista speech recognition by running the tutorial. I was
    amazed, it was awesome, recognised every word I said. Then I said the
    wrong word ... and it typed the right one. It was actually just
    detecting a sound and printing the expected word! -- pbhj on /.
     
    Phil Carmody, Dec 23, 2008
    #6
  7. dmp

    user923005 Guest

    On Dec 20, 5:07 am, dmp <> wrote:
    > How do I write a program to merge sort two linked list in C


    If it's an assignment, the first thing to do is find out clearly what
    the exact specifications are.
    Then think about how you would do it if the things to merge together
    were coins in a row of boxes or weights or something else that you can
    visualize putting into order.
    Then write code to accomplish what you have visualized.

    If it is to solve a problem and not for school, then just download a
    completed code library.
     
    user923005, Dec 23, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Ritchey
    Replies:
    7
    Views:
    509
    emerth
    Jul 10, 2003
  2. Chris Ritchey

    Generating a char* from a linked list of linked lists

    Chris Ritchey, Jul 9, 2003, in forum: C Programming
    Replies:
    7
    Views:
    501
    emerth
    Jul 10, 2003
  3. Damo

    Merging Linked Lists

    Damo, Dec 19, 2006, in forum: Java
    Replies:
    33
    Views:
    1,006
    Daniel Pitts
    Dec 24, 2006
  4. fool
    Replies:
    14
    Views:
    540
    Barry Schwarz
    Jul 3, 2006
  5. joshd
    Replies:
    12
    Views:
    699
    John Carson
    Oct 2, 2006
Loading...

Share This Page