code: 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--;
          }
      }
docs: Reverse a section of a fixed size array.
  
  @param path a path
  @param i    start index
  @param j    end index