Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Sorting in C  (Read 2959 times)

0 Members and 1 Guest are viewing this topic.

vishalsaxena17

    Topic Starter


    Beginner
    Sorting in C
    « on: May 22, 2008, 02:38:36 AM »
    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.
    I never loose , always learn from mistakes.....

    Computer Hope Admin

    • Administrator


    • Prodigy

      Thanked: 248
      • Yes
      • Yes
      • Yes
      • Computer Hope
    • Certifications: List
    • Computer: Specs
    • Experience: Guru
    • OS: Windows 10
    Re: Sorting in C
    « Reply #1 on: May 23, 2008, 08:35:31 PM »
    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

    Everybody is a genius. But, if you judge a fish by its ability to climb a tree, it will spend its whole life believing that it is stupid.
    -Albert Einstein

    Dias de verano

    • Guest
    Re: Sorting in C
    « Reply #2 on: May 24, 2008, 01:27:58 AM »
    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.