Google Answers Logo
View Question
 
Q: HELP: Can anybody help with a linked list question? ( No Answer,   1 Comment )
Question  
Subject: HELP: Can anybody help with a linked list question?
Category: Computers > Programming
Asked by: muckytakesrisks-ga
List Price: $19.50
Posted: 29 Aug 2005 13:06 PDT
Expires: 02 Sep 2005 10:20 PDT
Question ID: 561871
The following describes a structure for a node in a linked list
struct node
        {
          int data;
          struct node * next;
        };
typedef struct Node LISTNODE;
typedef LISTNODE *LISTNODEPTR;

Using the above structure and type definitions, write a C program to
merge two ordered lists of integers into a single ordered list of
integers. Your program should include the following functions:
(i) INSERT to insert data into the two ordered list
(ii) MERGE which recieves pointers to the first node of each of the
two lists to be merged, and returns a pointer to the first node of the
merged list.
(iii) PRINT LIST to print the contents of the merged list

Also explain the concept of apointer to a pointer, and why it is
necessary to use such a variable in link list manipulation. Illustrate
with a code segment from the above program.

Request for Question Clarification by maniac-ga on 29 Aug 2005 18:40 PDT
Hello Muckytakesrisks,

Hmm. This looks like homework, please see
  http://answers.google.com/answers/faq.html#homework
for an explanation and pricing at
  http://answers.google.com/answers/pricing.html

For the price offered, a researcher could point you to source code
that may be helpful such as
  http://www.cs.fiu.edu/~weiss/dsaa_c2e/list.c
and
  http://www.cs.fiu.edu/~weiss/dsaa_c2e/list.h
which could be adapted to write such a program.

Please advise if this type of answer would be sufficient.

  --Maniac

Clarification of Question by muckytakesrisks-ga on 30 Aug 2005 03:16 PDT
This is not a homework question, it is an exam question from a 2002
that i need answered as i need to be prepared if it comes up this
year. Iam afraid iam very limited in C programming and need the
question completed fully by a programmer. Thanks for input
Answer  
There is no answer at this time.

Comments  
Subject: Re: HELP: Can anybody help with a linked list question?
From: bozo99-ga on 29 Aug 2005 17:16 PDT
 
I think you'll find this book helpful.
http://www.amazon.com/exec/obidos/tg/detail/-/0131103628/qid=1125360821/sr=8-1/ref=pd_bbs_1/104-5763972-2169568?v=glance&s=books&n=507846

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy