public Integer[] removeUsingSorting(Integer[] numbers) {
    validateArray(numbers);
    if (numbers.length == 1 || numbers.length == 0) {
      return numbers;
    }

    Collections.sort(Arrays.asList(numbers));
    List<Integer> result = new LinkedList<Integer>();
    for (int i = 0; i < numbers.length - 1; i++) {
      if (!numbers[i].equals(numbers[i + 1])) {
        result.add(numbers[i]);
      }
    }
    result.add(numbers[numbers.length - 1]);
    return result.toArray(new Integer[result.size()]);
  }
Slow implementation for this algorithm. First of all, sort the array using QuickSort algorithm
and then, go through the array and add to a list just those consecutive elements that are
different.

The complexity order of this algorithm in space terms is O(N) where N is the number of
elements in the input array. The complexity order in time terms is equals to the sorting
algorithm, O( N log(N)).
src/main/java/com/github/pedrovgs/problem10/RemoveDuplicates.java