Concept Flow - Stack Implementation Using Linked List
Create new node with value
Set new node.next to current top
Update top pointer to new node
Stack push complete
Check if top is null?
Yes
Stack is empty
No
Read value from top node
Update top to top.next
Stack pop complete
Push adds a new node at the top by linking it to the current top. Pop removes the top node and updates the top pointer.
