Selection Sort Visualization

Selection Sort Visualization

void selection_sort(int A[], int n) {
    int minimum; 

    for(int i = 0; i < n-1; i++) {  
        minimum = i;  
        
        for(int j = i+1; j < n; j++) {  
            if(A[j] < A[minimum]) {  
                minimum = j;  
            }
        }  

        swap(A[minimum], A[i]);  
    }  
}