figure result of applying the selection sort algorithm to our sample array the gray boxes show the values that have been sortedthe black boxes show the values that are swapped during each iteration of the algorithm