Slide 1 Selection Sorting Lecture 21 Slide 2 Selection Sort Given an array of length n, –In first iteration: Search elements 0 through n-1 and select the smallest Swap…