Match functions and results

Report a typo

Match the functions with their descriptions:

Match the items from left and right columns
peek()
push()
empty()
pop()
search()
Retrieves or fetches the first/top element of the stack without removing it from the stack
Returns the position of the element from the top of the stack, else it will return -1
Removes the object at the top of this stack and returns that object
Places the element at the top of the stack
Returns true if nothing is on the top of the stack, else, it will return false
___

Create a free account to access the full topic