Bubble Sort

1. Which of the following statements is true (assume ascending sort order)?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

2. To sort an array in descending order, when will we swap two adjacent elements under consideration?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

3. Consider the following array:
A = [9, -1, -10, 9*, 2]
Note that the ‘*’ is used to mark a distinction between the two 9’s in order to keep track of their order while sorting. Which of the following represents the steps in sorting the above array (assume ascending order)?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation