It restricts the processing order
First-in-First-out (FIFO) is implemented as Queue
Last-in-First-out (LIFO) is implemented as Stack
Queue — FIFO Data Structure
Queue and BFS
Stack — LIFO Data Structure
Stack and DFS