Array Representation Using Stack
ARRAY REPRESENTATION OF STACK:-
(LIFO- LAST IN FIRST OUT)
EXAMPLE:
Initially:
empty stack
top = -1
step 1: push 3
top ++
step 2: push 5
top++
step 3,4: push 7,9
top + +
step 5: push 2
stack overflow
step...
arikmukherjee.hashnode.dev2 min read