Linked Stack
A linked stack is a dynamic, linear data structure.
It enforces the Last-In, First-Out (LIFO) protocol using a singly linked list.
Insertions (Push) and deletions (Pop) occur exclusively at the head node (designated as top).
Node Structure of Linked Stack
Info Part: Holds the element value.
Next: Stores the memory pointer referencing the underlying node in the stack (or NULL at the bottom).
Important Concept: For a linked stack, insertion and deletion are performed only at the `top`.
TOP
↓
Newest Element
↓
Next Node
↓
Next Node
↓
NULL
Therefore, a linked stack follows the **LIFO (Last In, First Out)** principle.