edited by
3,901 views
0 votes
0 votes

Which of the following algorithms sort $n$ integers, having the range $0$ to $(n^2 -1)$, in ascending order in $O(n)$ time?

  1. Selection sort
  2. Bubble sort
  3. Radix sort
  4. Insertion sort
edited by

4 Answers

Best answer
0 votes
0 votes
ans c except radix sort all given algorithms take O(n^2) time so ans is radix sort it performs sorting digit by digits taking O(n) time
selected by
0 votes
0 votes

Radix sort take O(N) time .

0 votes
0 votes
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.
Answer:

Related questions

2 votes
2 votes
1 answer
1
go_editor asked Jul 30, 2016
5,995 views
To determine the efficiency of an algorithm the time factor is measured byCounting micro secondsCounting number of key operationsCounting number of statementsCounting kil...
3 votes
3 votes
1 answer
2