Which of the following algorithms sort n integers, having the range 0 to (n2 – 1), in ascending order in O(n) time ?
(A) Selection sort
(B) Bubble sort
(C) Radix sort
(D) Insertion sort
- Selection sort takes O(n2) time.
- Bubble sort takes O(n2) time.
- Radix sort takes O(n) time.
- Insertion sort takes O(n2) time.
So, option (C) is correct.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.