(1) Selection Sort: Selection sort identifies the minimum element within the unsorted segment and positions it at the start. It avoids iterative comparison and swapping of adjacent elements.
(2) Bubble Sort: Bubble sort sequentially compares neighboring elements. If an adjacent pair is out of order, they are swapped. This action effectively moves the largest element to the array's end with each iteration.
(3) Insertion Sort: Insertion sort processes the array element by element, placing each into its rightful spot within the already sorted section. While it involves shifting elements, its core function isn't solely the comparison and swapping of adjacent items.
(4) Quick Sort: Quick sort employs a divide-and-conquer strategy, choosing a pivot and reorganizing the array around it. Although partitioning involves comparisons and potential swaps, it is not exclusively about comparing and swapping adjacent elements.
Consequently, the algorithm characterized by comparing and swapping adjacent elements when they are in the wrong order is (2) Bubble Sort.