Use a struct to represent a heap.