Operations on a Stack



There are four main operations on a stack: ·         Push - Adds an element to the top of the stack
·         Pop - Removes the top element from the stack
·         Top - Returns the top element on the stack
·         Empty - Tests if the stack is empty or not

No comments:

Post a Comment