code: private Set<Integer> arrayToSet(int[] arr) {
          Set<Integer> s = new HashSet<Integer>();
          for (int value : arr)
              s.add(value);
          return s;
      }
docs: Returns an integer {@link Set} containing all of the values in {@code
  arr}.