MaxPriorityQueue
This commit is contained in:
19
LinearList/priorityQueue/maxPriorityQueue.h
Normal file
19
LinearList/priorityQueue/maxPriorityQueue.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Created by PC on 25-8-9.
|
||||
//
|
||||
|
||||
#ifndef MAXPRIORITYQUEUE_H
|
||||
#define MAXPRIORITYQUEUE_H
|
||||
|
||||
template <class T>
|
||||
class maxPriorityQueue {
|
||||
public:
|
||||
virtual ~maxPriorityQueue() = default;
|
||||
virtual bool empty() const = 0;
|
||||
virtual int size() const = 0;
|
||||
virtual T& top() = 0;
|
||||
virtual void pop() = 0;
|
||||
virtual void push(const std::pair<T, int>& x) = 0;
|
||||
};
|
||||
|
||||
#endif //MAXPRIORITYQUEUE_H
|
Reference in New Issue
Block a user