Return the minimum number of swaps required to sort the array
public int minSwaps ( int [ ] arr , int N ) { int ans = 0 ; int [ ] temp = Arrays . copyOfRange ( arr , 0 , N ) ; Arrays . sort ( temp ) ; for ( int i = 0 ; i < N ; i ++ ) {