a heap - I see what you did there c++ series code example Example: max heap in c++ priority_queue <int> maxHeap;