Sunday, March 12, 2017

Data Structures

DS describes the way we organize the DATA and how efficiently we can perform operations depends on our requirements.Every Data Structure has their importance and a purpose. DS mainly focus on three operations that is Insert,Delete and Search . Let's start with few conventional Data Structures listed below.

Linked List

Linked list is a Data Structure consisting of a group of nodes which together represents a sequence. Each node composed of data and a reference to other node. Liked List is a linear Data Structure when we speak about traversal , i.e. if you whish to goto node C from node A , then you have to traverse through B .Linked List traversal depicted below.

Linked List Traversal
Linked List Traversal

Linked List is a non linear Data Structure when we speak about storage, i.e. address of node A node, B and node C need not be in sequence. It is possible that address of node A , B and C are 2010 ,1004 and 3010 respectively. As we said earlier every Data Structure has it’s importance.
The well known applications of Linked List are Listed below .
  1. LRU cache implementation
  2. Sparse Matrix.
  3. We will go in depth in Liked Lists applications section.

Stack

Stack is a linear Data Structure, by keeping in mind as a real physical Stack like structure, where insertion and deletion take place from top of the Stack. It accesses the data in LIFO manner. LIFO stands for Last In First Out.

Stack Operation
Stack Operation

The well-known applications of the Stacks are listed below.
  1. Expression evolution and Syntax parsing.
  2. Solving Towers of Hanoi puzzle.
  3. We will go in depth in Stack applications section.

Queue



Trees



Graphs



Searching




Sorting

* Counting Sort