C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28691
Number of posts: 94711

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
quick sort implemented with shell sort using c/c++ Posted by comsciepartner on 6 Oct 2008 at 2:02 AM

hello folks!!
i am angela,I am a gradauting students from philippines
i'm having a problem about my project,well i just pick this topic about sorting because i want to know if it's possible to combine the two sorting algorithm.
well it will need to show the running time of the quick sort and the shell sort.and if it possible to combine the two sorting algorithm it will nee again to show the running time of it.

pls. folks help e with this project..
huhuhu..

thanks
GodBless!!
Report
Re: quick sort implemented with shell sort using c/c++ Posted by Lundin on 6 Oct 2008 at 2:22 AM
What exactly do you need help with? If you just need the code for the algorithms, they are on Google. If you need help with the timing part, you need to specify which OS you are using. In Windows, use the GetTickCount() API function.
Report
Re: quick sort implemented with shell sort using c/c++ Posted by comsciepartner on 6 Oct 2008 at 2:53 AM
: What exactly do you need help with? If you just need the code for
: the algorithms, they are on Google. If you need help with the timing
: part, you need to specify which OS you are using. In Windows, use
: the GetTickCount() API function.




i need help with the codes for the porgram when the shell sort is inserted in quick sort program.and the computation of the running time ot it sir.
i am using windows xp.
thank you!!
Report
Re: quick sort implemented with shell sort using c/c++ Posted by Lundin on 6 Oct 2008 at 5:00 AM
I'm not sure what you mean with "combining" them. Do you want to compare which one of them that is best for certain data, or do you want to write a new sorting algorithm based on the other two?

For the comparison, simply fill an array with random numbers. You could make it possible for the user to select the size of the array at startup.

Sort the same array with the two algorithms. Needless to say, you can't modify the original array but must store the results in two different arrays.

Timing is done with GetTickCount() in Windows.h. You need to use a windows compiler.
Report
Re: quick sort implemented with shell sort using c/c++ Posted by comsciepartner on 6 Oct 2008 at 5:27 AM
: I'm not sure what you mean with "combining" them. Do you want to
: compare which one of them that is best for certain data, or do you
: want to write a new sorting algorithm based on the other two?
:
: For the comparison, simply fill an array with random numbers. You
: could make it possible for the user to select the size of the array
: at startup.
:
: Sort the same array with the two algorithms. Needless to say, you
: can't modify the original array but must store the results in two
: different arrays.
:
: Timing is done with GetTickCount() in Windows.h. You need to use a
: windows compiler.
:


thank you sir...
ahmm..can you give some example for the quick and shell algorithm using the GetTickCount() in Windows.h

Report
Re: quick sort implemented with shell sort using c/c++ Posted by Lundin on 6 Oct 2008 at 5:30 AM
No, since code begging (and responding to it with code) is against the C/C++ board policies. You are welcome to ask specific questions or post the code you are having trouble with, but you have to do the work yourself.
Report
Re: quick sort implemented with shell sort using c/c++ Posted by comsciepartner on 6 Oct 2008 at 5:45 AM
: No, since code begging (and responding to it with code) is against
: the C/C++ board policies. You are welcome to ask specific questions
: or post the code you are having trouble with, but you have to do the
: work yourself.

okay sir!yes i will!!
i'll post it later!!
thanks again!
mwuah



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.