retagged by
5,568 views
2 votes
2 votes
How many passes of bubble sort are required to sort the following sequence (Pass is counted only when at least one swap is performed in the bubble sort pass)?

                                                12, 15, 17, 11, 14, 13

(a) 6                                                                             (b) 5

(c) 4                                                                             (d) 3

I am getting ans as 3 but given answer in 4. please verify it
retagged by

1 Answer

Related questions

2 votes
2 votes
1 answer
2
gatecse asked Dec 9, 2020
828 views
The given array is $\text{arr={1, 2, 4, 3}}$. Bubble sort is used to sort the array elements. How many passes will be done to sort the array?$4$$2$$1$$3$
2 votes
2 votes
2 answers
3
Harikesh Kumar asked Dec 13, 2017
420 views
I studies in my book that time complexity of buble sort in best case =n^2 but I found it here ....its wrong ? If correct then how
1 votes
1 votes
1 answer
4
PriDix asked Feb 26, 2017
1,667 views
A machine takes 200 second to sort 200 names, using bubble sort . In 800 seconds , it can approximately sort how many names?