<reponame>egormm/py_sort
from typing import List


def selection_sort(arr: List[int]) -> List[int]:
    """find min, put it in the begging"""
    for i in range(len(arr) - 1):
        min_idx = i
        for j in range(i + 1, len(arr)):
            if arr[j] < arr[min_idx]:
                min_idx = j
        arr[i], arr[min_idx] = arr[min_idx], arr[i]
    return arr
