Data Structures-DSA Overview

Introduction

Nowadays, in the technology influenced world, Data and its information is a more essential part, and various implementations are made to store in different ways. A data structure is a particular way of organizing data in a computer so that it can be used effectively.

For example, we can store items with same data type can be stored in array data structure.

Index

0

1

2

3

4

5

6

7

8

9

10

11

.

.

.

.

Value

S

P

A

R

K

D

A

T

A

B

O

X

.

.

.

.

 Memory location

101

102

103

104

105

106

107

108

109

110

111

112

.

.

.

.


In the above example, the characters are stored in the array with the contiguous memory location.

Data can be stored in many different ways such as logical or mathematical for a particular organization of data is termed as data structure. The specific data model depends on two factors:

  • Firstly, it must be loaded in structure to reflect the actual relationships of data in the real world object.
  • Secondly, they should be stored in a simple enough so that anyone can process the data efficiently when necessary.

Categories of Data Structure

  • Linear Data Structure
  • Non-linear Data Structure

Linear Data Structure

A data structure is said to be linear if the data are combined to form any specific order. There are two techniques of representing such linear structure within memory.

  • The first step is to provide the linear relationships among all the elements represented using linear memory location. These linear structures are nothing but arrays.
  • The second step is to provide a linear relationship between all the elements through pointers or links. These linear structures are termed as linked lists.

Common examples of linear data structure are:

  • Arrays
  • Queues
  • Stacks
  • Linked Lists

Non-linear Data Structure

In the non-linear data structure, all the elements are linked with hierarchal relationship.

Examples of Non-linear Data Structure are:

  • Graph 
  • Tree

Graph

In Graph, data sometimes hold a relationship between the pairs of elements which is not necessarily following the hierarchical structure.

Tree

In Tree, data hold a hierarchical relationship between various elements. The data structure that reflects this relationship is termed as rooted tree graph or a tree.