COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
push
|
|
pop
|
|
peep
|
|
update
|
Detailed explanation-1: -POP operation If the stack is not empty, we first access the element which is pointed by the top. Once the pop operation is performed, the top is decremented by 1, i.e., top=top-1.
Detailed explanation-2: -push() − Pushing (storing) an element on the stack.
Detailed explanation-3: -In computer science, a stack is an abstract data type that serves as a collection of elements, with two main operations: Push, which adds an element to the collection, and. Pop, which removes the most recently added element that was not yet removed.
Detailed explanation-4: -In the pushdown stacks only two operations are allowed: push the item into the stack, and pop the item out of the stack. A stack is a limited access data structure-elements can be added and removed from the stack only at the top. push adds an item to the top of the stack, pop removes the item from the top.