46 if (!front)
return nullptr;
48 Node* result = temp->data;
50 if (!front) rear =
nullptr;
59 return front ==
nullptr;
Declaration of the Queue class.
Represents a node within a binary search tree.
~Queue()
Destroys the Queue.
Node * dequeue()
Removes and returns the node at the front of the queue.
void enqueue(Node *n)
Adds a node to the end of the queue.
bool isEmpty() const
Checks whether the queue is empty.
Internal node type used by the Queue class.