Stack: Data Structure

Stack is kind of data structure which allows operations on data only at one end. It allows access to the last inserted data only. Stack is also called LIFO (Last In First Out) data structure and Push and Pop operations are related in such a way that only last item pushed (added to stack) can be popped (removed from the stack).

not available

Basic Operations:

not available

begin
if stack is full
return
endif
else
increment top
stack[top] assign value
end else
end procedure


begin
if stack is empty
return
endif
else
store value of stack[top]
decrement top
return value
end else
end procedure