41 if (!top)
return nullptr;
43 Node* result = temp->data;
53 return top ==
nullptr;
Declaration of the Stack class.
Represents a node within a binary search tree.
~Stack()
Destroys the Stack.
Node * pop()
Removes and returns the node at the top of the stack.
bool isEmpty() const
Checks whether the stack is empty.
void push(Node *n)
Pushes a node onto the stack.
Internal node type used by the Stack class.