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

Answer Posted / ntrphanikumar

I am not sure about the answer.

But I think the answer is "Selection Sort" whose order is
O(n^2) irrespective of the elements order.

I guess all other sorts somehow depend on the order of elements.

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stack in geography?

473


Define an algorithm.

575


which notations are used in evaluation of arithmetic expressions using prefix and postfix forms?

532


How expression trees are gets represented in data structure?

504


Run time memory allocation is known as in data structure?

539






Define a priority queue?

603


Describe what is Node in link list? And name the types of Linked Lists?

540


How do you find the length of an arraylist?

491


How many types of linked lists are there?

457


What is linked list with example?

500


What member function places a new node at the end of the linked list?

647


How do you find the second largest element in an array of integers?

585


What is circular queue example?

478


Explain what are the types of collision resolution techniques and the methods used in each of the type?

518


Is array a dynamic data structure?

517