Swaps the position of two elements in the given array. The elements must exist in the same array. The array is modified in-place.
The input array.
The first element to swap.
The second element to swap.
Swaps the position of two elements in the given array. The elements must exist in the same array. The array is modified in-place.