add queue isEmpty()
This commit is contained in:
@ -55,3 +55,7 @@ void Queue::print() const {
|
||||
// std::cout << std::endl;
|
||||
}
|
||||
*/
|
||||
|
||||
bool Queue::isEmpty() const {
|
||||
return *this->tail == this->head;
|
||||
}
|
||||
|
||||
@ -37,6 +37,7 @@ public:
|
||||
Chain* dequeue();
|
||||
void remove(Chain* item);
|
||||
// void print() const;
|
||||
bool isEmpty() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user