What is the time complexity of selection sort?



What is the time complexity of selection sort?..

Answer / Mohd Nazir

The time complexity of Selection Sort is O(n^2) in the worst case (when the array is sorted in reverse order), and O(n^2) in the average case. In the best case, where the input is already sorted, its time complexity is O(n^2).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

For which header list, the last node contains the null pointer?

1 Answers  


Can arraylist contain null?

1 Answers  


How many parts are there in a declaration statement using data structures?

1 Answers  


What are the non linear data structure?

1 Answers  


Which language is best for data structures and algorithms?

1 Answers  


How do we search a specific element in an array?

1 Answers  


Is arraylist reference type?

1 Answers  


What is binary tree? Explain its uses.

1 Answers  


How many types of data structures are there?

1 Answers  


What is the two-dimensional array?

1 Answers  


Define depth and height of a node?

1 Answers  


What is non linear structure?

1 Answers  


Categories