code: public static boolean[] sampleWithoutReplacementBooleans(int sampleSize, int n) {
          int[] indices = sampleWithoutReplacement(sampleSize, n);
          Arrays.sort(indices);
          assert indices.length == sampleSize;
          boolean[] bools = new boolean[n];
          int j=0;
          for (int i=0; i<bools.length; i++) {
              if (j < indices.length && i==indices[j]) {
                  bools[i] = true;
                  j++;
              }
          }
          return bools;
      }
docs: Samples a set of sampleSize integers without replacement from the range [0,...,n-1].
  @param sampleSize The number of integers to return.
  @param n The number of integers from which to sample.
  @return A boolean array, where sampled indices i have bools[i] = true.