Added copy values from original array, because it must be immutable. Without that after call selectionSort origin array will become empty.
Added copy values from original array, because it must be immutable. Without that after call selectionSort origin array will become empty.