public static <T> void swap(T @NotNull [] array, int i1, int i2) {
    T t = array[i1];
    array[i1] = array[i2];
    array[i2] = t;
  }
public static <T> void swap(T @NotNull [] array, int i1, int i2)