A list is ordered from smaller to largest when a sort is
called. Which sort would take the shortest time to execute?

Answer Posted / rohit

Bubble sort with a flag variable to check if comparisons
occur or not. If it is already sorted then in just 1
iteration it will show that the array is sorted which is
not possible in any other sort.THUS JUST 1 ITERATIION IS
REQUIRED IN THIS CASE.

Is This Answer Correct ?    27 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of bulleted list?

448


What are the benefits of using arrays?

509


Explain how is linked list implemented?

527


List the data structures which are used in rdbms.

534


Which sorting algorithm is the slowest?

473






How many types of arrays are there in visual basic?

450


What is stack push?

460


What is data structure definition?

494


What are the difference between a stack and a queue?

524


“int a[] = new int[3]{1, 2, 3}” – This a legal way of defining the arrays?

710


How can a binary tree be represented using the rotation?

540


Define a Deque?

606


What is the best sorting technique?

491


How do you get placements?

472


Explain the uses of b+ tree.

535