0
How many swaps of adjacent elements does bubble sort perform while sorting the array 5, 1, 4, 2, 8 in ascending order?
- A4
- B3
- C5
- D6
Correct answer: A
How many swaps of adjacent elements does bubble sort perform while sorting the array 5, 1, 4, 2, 8 in ascending order?