Array elements which won't be swapped

Report a typo

Given an array of ints:

{ 8, 9, 1, 2, 13, 12, 11, 15, 16}

We sort the array in ascending order using the bubble sort. Enter elements' indices that will not be swapped at any moment during the sorting.

Example output:

0 1 2
Enter a short text
___

Create a free account to access the full topic