1.

Solve : Sorting in C?

Answer»

hello

Question :- If we have given certain numbers ( 23, 21,19, 18,15,10) all the numbers are ALREADY SORTED . Now suppose we are given three sorting techniques (Bubble sort, Insertion sort, Quick sort) . If we have to find a number among the given numbers then which of the given sorting techniques wll be faster and why??

Thankx in advance.
Tough question (at least to me) to answer, because it could vary on how the algorithm is WRITTEN to sort the data. But I BELIEVE most consider quick sort to be the fastest technique for sorting data. Check out the below page as it gives you examples of each of the types of sorting techniques and clicking on the image gives you a visual example of how the sort works.

http://www.cs.ubc.ca/~harrison/Java/sorting-demo.html

Sure sounds like a homework question to me. It requires thought, rather than knowledge. If you understand how the mentioned sort ALGORITHMS work, the answer will be obvious (as it is to me). But I SHALL not TELL you.




Discussion

No Comment Found