Google Answers Logo
View Question
 
Q: Linked List C ( No Answer,   1 Comment )
Question  
Subject: Linked List C
Category: Computers > Programming
Asked by: linkinpark-ga
List Price: $25.00
Posted: 02 Mar 2004 22:12 PST
Expires: 03 Mar 2004 09:18 PST
Question ID: 312858
Need someone to write a simple linked list.  Here are the details, I
need a struct of "dogs", the struct will have two fields (for
shortness sake), one field will be name, the other, owners name.  I
need a way to add more dogs, a linked list needs to be used.  It needs
the normal operations: add, remove. But it also needs a sort.(be sure
to give an example on how to "call" each of these, just in case)  The
sort should sort by dogs name.  This needs to be in 'C'.  A good tip
will be given to a great answer

Clarification of Question by linkinpark-ga on 03 Mar 2004 08:57 PST
would $25.00 be enough?

Clarification of Question by linkinpark-ga on 03 Mar 2004 09:16 PST
Also, there has to be a sort function, i.e. you cant add the nodes to
the list in order, the sort has to be done seperatly
Answer  
There is no answer at this time.

Comments  
Subject: Re: Linked List C
From: majortom-ga on 03 Mar 2004 08:28 PST
 
Hello, linkinpark-ga,

Merge sort is the best choice of algorithm for sorting linked lists.
I'm afraid I won't be able to take on the task of writing an original
implementation of it for the list price of this question, but you are
welcome to check out the results of my research into your question.
The following page offers both a clear and concise explanation of how
to sort a linked list quickly and an implementation in C. You are,
however, required to keep the copyright notice in the code if you use
the code provided. This page should be of great help to you:

Mergesort for Linked Lists
http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html

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