in Algorithms
226 views
0 votes
0 votes

 

If we use bubble sort and run the outer loop for 3 rounds we can get 3 smallest elements  in at most (n-1+n-2+n-3) i.e. 3n-6 comparisons

in that way (C) is also true

in Algorithms
226 views

4 Comments

Yup

but answer given is A) right ??
0
0
ans given is actually C using heap and delete from heap operation
0
0
hmm that's also a nice approach
0
0
edited by
O(n)
0
0

Please log in or register to answer this question.