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

Answer Posted / zeeshan

quick sort is the answer.....quick sort shows worst case
behaviour when the list is already sorted....

courtesy"" shaum series- data structures""

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use any class as map key?

453


Describe binary tree and its property.

521


Where is insertion sort used?

504


How many sorting are there in data structure?

494


What is complexity algorithm?

463






How to excel in data structures and algorithms?

536


Describe tree database. Explain its common uses.

555


Does treemap allow null key?

482


What do you mean by secondary clustering?

532


If we try to add duplicate key to the hashmap, what will happen?

487


What is the default size of arraylist?

485


Can arraylist hold different types?

481


Does hashset allow duplicates?

566


How many null values are allowed in hashmap?

511


Define a linear and non linear data structure.

511