static int [ ] uniquify ( int [ ] ints , int start , int end ) { IntSet iset = new IntSet ( ) ; for ( int i = end ; -- i >= start ; ) { iset . add ( ints [ i ] ) ; } return iset . toIntArray ( ) ; }
returns a sorted unique copy of ints .