public double[] getKeys() {
        double[] keys = new double[heap_size];
        for (int i = 1; i <= heap_size; i++) {
            keys[i - 1] = ar[i].getKey();
        }
        return keys;
    }