How does the selection sort algorithm work, and what is its primary disadvantage?
Instructor solution
Selection sort is a simple comparison-based sorting algorithm. It works by repeatedly finding the minimum element from the unsorted part of the array and swapping it with the first unsorted element. This process is repeated until the entire array is sorted. The primary disadvantage of selection sort is its time complexity of
You may exit out of this review and return later without penalty.