private static void reverse ( int [ ] path , int i , int j ) { while ( i < j ) { int tmp = path [ i ] ; path [ i ] = path [ j ] ; path [ j ] = tmp ; i ++ ; j -- ; } }
Reverse a section of a fixed size array .