public V delete_min() {
        HeapNode minNode = ar[1];
        ar[1] = ar[heap_size];
        heap_size--;
        ar[1].setIndex(1);
        heapify(1);
        this.resizeArray();
        HeapIndex hind = null;
        try {
            hind = (HeapIndex) minNode.getValue();
        } catch (Exception ex) {
            hind = null;
        }
        if (hind != null) {
            hind.setHeapIndex(0);
        }
        return minNode.getValue();
    }