How many passes are required to sort the following values through bubble sort 10 1 2 3 6 8?

 How many passes are required to sort the following values through bubble sort 10 1 2 3 6 8?

Bubble sort need n-1 passes to sort the array
no of elements are 6
no of passes would be 5

Compare adjacent no's and swap if 1st no greater then 2nd 

















Post a Comment

0 Comments