Q&A CBSE12A-2018-B03A #6126
Question:
Consider the following randomly ordered numbers stored in a list
786, 234, 526, 132, 345, 467,
Show the content of list after the First, Second and Third pass of the bubble sort method used for arranging in ascending order ?
Note: Show the status of all the elements after each pass very clearly underlining the changes.
Answer:
I Pass 234, 526, 132, 345, 467, 786
II Pass 234, 132 , 345 , 467 , 526 , 786
III Pass 132 , 234 , 345 , 467, 526, 786
