Liner List Manipulation

Question

What will be the status of the following list after the First, Second and Third pass of the bubble sort method used for arranging the following elements in descending order ?
Note: Show the status of all the elements after each pass very clearly underlining the changes.
152, 104, -100, 604, 190, 204

Answer

Phase I

152

104

-100

604

190

204

152

104

-100

604

190

204

152

104

-100

604

190

204

152

104

604

-100

190

204

152

104

604

190

-100

204

152

104

604

190

204

-100

 Phase II

152

104

604

190

204

-100

152

104

604

190

204

-100

152

604

104

190

204

-100

152

604

190

104

204

-100

152

604

190

204

104

-100

 Phase III

152

604

190

204

104

-100

604

152

190

204

104

-100

604

190

152

204

104

-100

604

190

204

152

104

-100

Sponsor Area