Concept Flow - Stack Implementation Using Linked List
Create new node
Push operation: newNode.next = top
Update top = newNode
Stack grows with new top
Pop operation: if top != null
Save top.data
Update top = top.next
Return saved data
Stack shrinks from top
The stack adds new nodes at the top by linking them to the previous top, and removes nodes from the top by moving the top pointer to the next node.
