What is the method to save data in stack data structure type?
Answers
Answered by
2
1)Push: Adds an item in the stack. If the stack is full, then it is said to be an Overflow condition.
2)Pop: Removes an item from the stack. The items are popped in the reversed order in which they are pushed. If the stack is empty, then it is said to be an Underflow condition.
3)Peek or Top: Returns top element of stack.
4)isEmpty: Returns true if stack is empty, else false.
Answered by
6
o0×X×0o. ʜᴇʀᴇ ɪs ʏᴏᴜʀ ᴀɴsᴡᴇʀ .o0×X×0o.
Data is stored in Stack data structure type using First in Last out (FILO) mechanism. Only top of the stack is accessible at a given instance. Storing mechanism is referred as a PUSH and retrieve is referred as a POP.
ᴇʜsᴀss ✿◕ ‿ ◕✿
Anonymous:
hi
Similar questions