You are on page 1of 14

INTRODUCTION TO DATA

STRUCTURE AND
ALGORITHM

Presenting by
chandana S
CONTENTS
 Data structure definition
 Types of data structure
 Stack
 Queue
 Linked list
 Tree
 Graph
 Algorithm types
DATA STRUCTURES

Data structures is the group of elements which


provides an efficient way of storing and organising
data in the computer so that it can be use efficiently.
TYPES OF DATA STRUCTURE
1 . Linear data structure
stack, queue, linked list
2 . Non linear data structure
tree and graph
STACK

 Stack
is a linear data structure which works on
LIFO order
 In
stack element is always added at the top and also
removed from the top of the stack
QUEUE
 Queueis also a linear data structure which works on
FIFO order.
 In
queue elements are always added at rear of queue
and removed from front of queue
LINKED LIST
 A linkedlist is a linear collection of data elements, in
which linear order is not given by their physical
placement in memory.
 Elements are added in front end of the list as well as
middle of list
TREE

A tree is a non linear data structure, a root value and a


sub trees of a children with a parent node represented
as set of linked nodes
Application :
 manipulate hierarchical data
 Make information easy to search
 Manipulate sorted list of data
GRAPH
A graph is a non linear data structure. A set of items
connected by edges. Each item is called a vertex or
node. Formally , a graph is set of vertices and a binary
relation between vertices, adjacency.
Application
 Finding shortest routes, searching, internet routing.
ALGORITHM

Types of algorithm
 Recursive algorithm
 Backtracking algorithm
 Divide and conquer algorithm
RECURSIVE ALGORITHM
A function calling itself
Application
 Tower oh honnai
 Fibbonacci series generation
 Factorial of a number calcution
BACKTRACKING ALGORITHM
Backtracking algorithm is used to solve problem by
recursive calling to find the solution by step by step
increasing values with time.
Application
 N- queen problem
 Find hamiltonion cycle of a graph
 Graph coloring problem
DIVIDE AND CONQUER

Divide: Divide the problem into some sub problem.


Conquer: Solve the Sub problems by calling
recursively.
Combine: Combine the Solution of Sub problems.
THANK YOU!!

You might also like