DHeap implementation for university assignment.