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