Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

quick sort implemented with shell sort using c/c++


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!!

Comments

  • LundinLundin Posts: 3,711Member
    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.
  • comsciepartnercomsciepartner Posts: 4Member
    : 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!!
  • LundinLundin Posts: 3,711Member
    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.
  • comsciepartnercomsciepartner Posts: 4Member
    : 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

  • LundinLundin Posts: 3,711Member
    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.
  • comsciepartnercomsciepartner Posts: 4Member
    : 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
Sign In or Register to comment.