You are on page 1of 14

UNIT 1

INTRODUCTION TO ALGORITHM AND DATA STRUCTURES

Subject: Fundamentals of Data Structures By Prof. Megha Patil.


Data Structures :

• A data structure is a data organization, management, and


storage format that enables efficient access and modification.
OR
Data Structure is a way to store and organize data so that it can be
used efficiently.
OR
• Data structure is specialized format for organizing and storing data so that
It can be accessed and worked with an appropriate ways to make an program
efficient
As data is not always in the same format, same data structure cannot be
Used to store the data

Also management, efficiency and Accessing data also differs with different
Data Structures.
Data Structure Classification:

 Linear Category 1 Based upon Organization of Data Items


 Non-linear

 Static
Category 2 Based upon Existence
 Dynamic

 Persistent
Category 3
 Ephemeral
Data Structure Classification:

Derived from Primitive Data Structures


Inbuilt or Can be Directly Accessed
More Complicated
through m/c Instructions

Linear Data Structure Vs. Non- Linear Data Structure


UNITS
1. Introduction to Algorithm and Data Structures

2. Linear Data Structure Using Sequential Organization

3. Searching and Sorting

4. Linked List

5. Stack:

6. Queue
Linear Vs. Non- Linear

Linear: Data items are ordered Sequentially or Linearly one after another.
 Traversing: one after another. So Accessing Last element is headache.
 Memory Allocation: Linear
 Homogeneous Data can be stored
 Examples: Array, Linked List, Stack Queue.

Array
LINKED LISTS

A B C 

Head

 A linked list is a series of connected nodes


 Each node contains at least
 A piece of data (any type)
 Pointer to the next node in the list
 Head: pointer to the first node node
A
 The last node points to NULL
data pointer
STACK:
QUEUE:
Linear Vs. Non- Linear
 Linear: Data items are not ordered Sequentially or Linearly one after another.
 Traversing: Cannot be traversed in single run.
 Memory Allocation: Non-Linear
 Examples: Graphs, Trees.

Trees Graphs
Applications:

 Arrays: Sequential Data


Trees: Storing the information of Book index
• Hierarchical data
Graph: Facebook / Social medial profile linkage
• Network
• Distance between Cities

Queue : operating System


This is Core Subject

Where it is used ?
As long as a field which has to deal with storing any form of data, data structures will be
involved. It would be more meaningful to ask which fields do not need the concept of
data structures.

You might also like