def selection_sort(a: list) -> list:
    """Given a list of element it's return sorted list of O(n^2) complexity"""
    a = a.copy()
    n = len(a)
    for i in range(n):
        mni = i
        for j in range(i+1, n):
            if a[j] < a[mni]:
                mni = j
        a[i], a[mni] = a[mni], a[i]
    return a