Memory Representation/Array Representation of Stack
Memory Representation/Array Representation of Stack :-
Stacks are abstract data types. They are implemented either by an array or by a linked list. In array representation a pointer or variable TOP is used to keep track of the stack. TOP is incremented when items are inserted into stack. It is decremented when items are removed from the stack. A variable N is used to store the maximum number of elements in the stack.
![]() |
Fig - Memory/Array Representation of Stack |
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment