In the bubble sort algorithm, If there are no swaps then the array becomes in sorted order.

Consider the following array and how many passes or iterations it runs an optimized bubble sort algorithm?

Input: 42, 20, 10, 15, 19

Output: 10, 15, 19, 20, 42

1
1
2
2
3
3
4
4

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation