Question

# For which sorting algorithm is the following true: After I iterations, Data(0]. Data()-11 is Datal] DataIN-1] is unexamined. [1] Selection sort [2] Quick sort [3] Bubble sort [4] Heap sort [5] Insertion sort sorted

Answer

Bubble sort

- Q: What is the characteristic of each sorting algorithm? A: 1. Selection sort: Brings the smallest items to the front of the array each iteration 2. Quick sort: Uses a pivot point and partitions data around it for each iteration 3. Bubble sort: Compares adjacent pairs and swaps them if they are not in the correct order until the entire array is sorted 4. Heap sort: Builds a binary heap to sort the array 5. Insertion sort: Iterates through the array and takes each item and inserts it into its proper place in the sorted portion of the array.
- Q:Based on the given statement, which sorting algorithm does it refer to? A: The given statement refers to Bubble sort.