function a = selection_sort(nums)
    a = nums;
    for i = 1:size(nums, 2)
        smallest = i;
        for j = i+1:size(nums, 2)
            if a(smallest) > a(j)
                smallest = j;
            end
        end
        temp = a(i);
        a(i) = a(smallest);
        a(smallest) = temp;
    end
end