def selection_sort(arr, simulation=False):
iteration = <NUM_LIT:0><EOL>if simulation:<EOL><INDENT>print("<STR_LIT>",iteration,"<STR_LIT::>",*arr)<EOL><DEDENT>for i in range(len(arr)):<EOL><INDENT>minimum = i<EOL>for j in range(i + <NUM_LIT:1>, len(arr)):<EOL><INDENT>if arr[j] < arr[minimum]:<EOL><INDENT>minimum = j<EOL><DEDENT><DEDENT>arr[minimum], arr[i] = arr[i], arr[minimum]<EOL>if simulation:<EOL><INDENT>iteration = iteration + <NUM_LIT:1><EOL>print("<STR_LIT>",iteration,"<STR_LIT::>",*arr)<EOL><DEDENT><DEDENT>return arr<EOL>
Selection Sort
        Complexity: O(n^2)