Friday, October 30, 2020

IMPLEMENT STACK USING ARRAY

IMPLEMENTATION  USING ARRAY

DATA STRUCTURE

We will use structure to create stack that will have three things
1- Max Size : contains the maximum size stack can have or its capacity
2- Top : contains the index of the top element
3- items array or pointer to array : contains the elements of stack








Header Files :





operations to perform :

1- Initialization of stack




2- Getting size of stack




3- Check the status i.e. is the stack empty or not




4- Check the status i.e. is the stack full or not




5- Adding element to stack using Push operation




6- Removing the top of the stack using Pop operation





7- Getting the top of the stack











No comments:

Post a Comment