Implementation
of Stack (static)
Answers
Answered by
1
Answer:
In an array, elements can be added or deleted at any position but while implementing stack, we have to permit insertions and deletions at top of the stack only. So we can take a variable top, which keeps the position of the topmost element in array. Initially when the stack is empty, value of top is initialized to -1.
please mark me as brainliest
Explanation:
Similar questions