def selection_sort(lst):
    """Selection sort algorithm."""
    for i in range(len(lst) - 1):
        lowest_idx = i
        for j in range(i + 1, len(lst)):
            if lst[lowest_idx] > lst[j]:
                lowest_idx = j
        lst[i], lst[lowest_idx] = lst[lowest_idx], lst[i]
    return lst