Bubble sort in ascending order

Report a typo

Given the following array of integers:


{ 12, 20, 11, 10, 14, 16, 15, 10 }

We sort the array using bubble sort in the ascending order from the left to right.

Perform two full iterations of the algorithm and output the elements after all swaps.

The output format example:

12 20 11 10 14 16 15 10 
Enter a short text
___

Create a free account to access the full topic