Queue data structures explained

Queue data structures are used for storing collection of data where order in which data is arriving is important. In Queue, insertion and deletion both happened from the different end.
Data insertion are done at one end which is known as “rear end” while data deletion are done at other end known as “front end“. The data which is arrived first will be deleted first in Queue.
This data ordering is called as First in First out or FIFO.

(more…)
Queue data structures explained Read More

Topological Sort Explained With Simple Example

Topological sort is a method to sort the vertices in directed acyclic graph in which each node comes before all the nodes to which it has edges going to. Topological sort is mainly used in cases where a certain node can be visited if and only if certain nodes has been visited before.

A Directed Acyclic graph or DAG is a graph which doesn’t have any cycle.

All pairs of consecutive vertices in topological sorted order are connected by edges which forms a directed Hamiltonian Path.

(more…)
Topological Sort Explained With Simple Example Read More

Implementation of Queue using Stack

Queue is a data structure used for storing collection of data where order in which data is arriving is important. In Queue, insertion and deletion both happened from the different end.
Data insertion are done at one end which is known as “rear end” while data deletion are done at other end known as “front end“. The data which is arrived first will be deleted first in Queue. This data ordering is called as First in First out or FIFO.
Before going ahead have a look into Queue basics, Stack basics and Stack Implementation.

(more…)
Implementation of Queue using Stack Read More

Program to reverse a Queue

Queue is a data structure used for storing collection of data where order in which data is arriving is important. In Queue, insertion and deletion both happened from the different end.
Data insertion are done at one end which is known as “rear end” while data deletion are done at other end known as “front end“. The data which is arrived first will be deleted first in Queue. This data ordering is called as First in First out or FIFO.
Before going ahead have a look into Queue basics and Queue implementation.

(more…)
Program to reverse a Queue Read More

Generic Queue implementation using array

Queue is a data structure used for storing collection of data where order in which data is arriving is important. In Queue, insertion and deletion both happened from the different end.
Data insertion are done at one end which is known as “rear end” while data deletion are done at other end known as “front end“. The data which is arrived first will be deleted first in Queue. This data ordering is called as First in First out or FIFO.
Before going ahead have a look into Queue basics.

(more…)
Generic Queue implementation using array Read More

Queue implementation using array

Queue is a data structure used for storing collection of data where order in which data is arriving is important. In Queue, insertion and deletion both happened from the different end.
Data insertion are done at one end which is known as “rear end” while data deletion are done at other end known as “front end“. The data which is arrived first will be deleted first in Queue. This data ordering is called as First in First out or FIFO. Before going ahead have a look into Queue basics.

(more…)
Queue implementation using array Read More

Queue basics and representation

Queue is a data structure used for storing collection of data where order in which data is arriving is important. In Queue, insertion and deletion both happened from the different end.
Data insertion are done at one end which is known as “rear end” while data deletion are done at other end known as “front end“. The data which is arrived first will be deleted first in Queue. This data ordering is called as First in First out or FIFO.

(more…)
Queue basics and representation Read More