______ Sorting compares two adjoining values and exchange them if they are not…
2026
______ Sorting compares two adjoining values and exchange them if they are not in proper order.
- A.
Heap
- B.
Selection
- C.
Insertion
- D.
Bubble
Attempted by 326 students.
Show answer & explanation
Correct answer: D
The sorting algorithm that compares two adjoining values and exchanges them if they are not in proper order is Bubble Sort.
In Bubble Sort, the algorithm repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. This process continues until the list is sorted.
This behavior matches the description in the question exactly.