IMPLEMENTING STACK USING LINKEDLIST
This provide us ability to define our own data structure and point it to another same data structure using pointers which can be done dynamically .
Here , Since we are using Linked list we will use malloc and free ( in C ) to allocate memory and then deallocate it when needed.
Structure or Linked list Node
Header Files
OPERATIONS
NOTE : Since , performing operations on head is easy and efficient so we will choose head node as top node and will perform all operations on head node
1- PUSH
2- IS EMPTY
3- TOP
4- POP
No comments:
Post a Comment