Data Structure

Selection Sort

Learn data structure by example of selection sort algorithm

4/21/2021
0 views
selection-sort-algorithm.cC
for i = 1 to n-1 do
    min j = i;
    min x = A[i]
    for j = i + 1 to n do
        If A[j] < min x then
            min j = j
            min x = A[j]
    A[min j] = A [i]
    A[i] = min x
data structurealgorithmselection sort algorithmselection sort

Loading comments...

Related Examples