Category: Computers > Algorithms
Asked by: whutupbioootch-ga
List Price: $10.00
17 Feb 2005 18:04 PST
Expires: 19 Mar 2005 18:04 PST
Question ID: 476292
I need the code to sort an array using recursion.
Re: C++ Problem
Answered By: maniac-ga on 17 Feb 2005 19:16 PST
Hello Whutupbioootch, There are a few sort algorithms that are recursive. Perhaps the most common are the "quick" sort and the merge sort. There are several sites on the Internet that have source code for both. For example: http://www.cs.fiu.edu/~weiss/dsaa_c++/code/Sort.h is a C / C++ header file that implements several sort algorithms including both quicksort and merge sort. See also http://www.cs.fiu.edu/~weiss/dsaa_c++/code/ for more information about the code available on this site. Another example is at http://linux.wku.edu/~lamonml/algor/sort/merge.html which has the merge sort and http://linux.wku.edu/~lamonml/algor/sort/quick.html which has the quicksort, both written in C (callable from C++). Several more are available using searches such as recursive sort source code c quicksort source code c++ merge sort source code c++ merge quick sort source code c If you need additional references or if you have problems using any one of these, please make a clarification request. --Maniac Û
rated this answer:
and gave an additional tip of:
This is just what I needed.
|There are no comments at this time.|
If you feel that you have found inappropriate content, please let us know by emailing us at firstname.lastname@example.org with the question ID listed above. Thank you.
|Search Google Answers for|