______ 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.

  1. A.

    Heap

  2. B.

    Selection

  3. C.

    Insertion

  4. 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.

Explore the full course: Coding For Placement