Linear Structure

Queue

A Queue is a linear structure that follows a particular order in which the operations are performed. The order is First In First Out (FIFO). A good example of a queue is any queue of consumers for a resource where the consumer that came first is served first.

Types of Queue in Data structure | Queue Data structure Introduction and Operations

Code to implement [src code]

Stack

Stack is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out).

Stack Data Structure and Implementation in Python, Java and C/C++

**Code to implement **[src code]

Last updated

Was this helpful?