CSC403: PlaygroundSearch [2/8] Previous pageContentsNext page

See algs14.PlaygroundSearch

Note: doubleSortedUnique implementation for reference...

01
02
03
04
05
06
07
08
  public static double[] doubleSortedUnique (int N) {
    if (N < 0) throw new IllegalArgumentException ();
    double[] a = new double[N];
    for (int i = 0; i < N; i++) {
      a[i] = i;
    }
    return a;
  }

Previous pageContentsNext page