An algorithm repeatedly comparing neighbouring elements and swapping them is:
ABorder sort
BBubble sort
CBucket sort
DBarrel sort
Answer & Solution
Correct answer: B. Bubble sort
1. Only adjacent pairs are ever compared.
2. Out of order pairs are exchanged.
3. That algorithm is bubble sort.
_Source: syllabus Computer Science Class XII, Chapter 5, Sorting._
Keep practising Sorting Algorithms
Browse all Sorting Algorithms questions for Engineering — Tanzania, or explore more Computer Science topics.