docs: public static int[] deleteDuplicatedPages(int[] pages) {
          List<Integer> result = new ArrayList<Integer>();
          int lastInt = -1;
          for (Integer currentInt : pages) {
              if (lastInt != currentInt) {
                  result.add(currentInt);
              }
              lastInt = currentInt;
          }
          int[] arrayResult = new int[result.size()];
          for (int i = 0; i < result.size(); i++) {
              arrayResult[i] = result.get(i);
          }
          return arrayResult;
      }