public int[] getInsertComplexities(RedBlackTree<InstrumentedKey, Integer> d,
            int maxSize, int repititions) {
        int[] totals = new int[maxSize];

        for (int i = 0; i < repititions; i++) {
            int[] counts = doInserts(d, maxSize);

            for (int j = 0; j < maxSize; j++) {
                totals[j] += counts[j];
            }
        }

        for (int j = 0; j < maxSize; j++) {
            totals[j] /= repititions;
        }

        return totals;
    }