In which sorting algorithm does the largest element "bubble" to the end of the array in each pass?
17 views
- Insertion sort
- Selection sort (Correct Answer)
- Quick sort
- Merge sort
Explanation
Answer: b) Selection sort
Explanation: Selection sort works by selecting the smallest (or largest) element from the unsorted part of the array and moving it to the front. In each pass, the largest element "bubbles" to the end of the array, resulting in a sorted array.