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


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.