Merging Linked List in C

A

Andrey Tarasevich

dmp said:
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.
 
R

Richard Bos

dmp said:
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
 
P

Phil Carmody

dmp said:
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
 
U

user923005

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top