Professional Documents
Culture Documents
Importance of DSA
Importance of DSA
DATA STRUCTURES
AND
ALGORITHMS
WELCOME TO THE WORLD OF
Data Structures And Algorithms
Algorithm
Ever made a plan to hangout at an
amusement park?
of:
1. space for each data item it stores
2. time to perform a single basic operation
3. programming effort.
Graphs , trees , stacks , queues these are
Data Structures
Stack
Stack is organized as a Last In First Out(LIFO)
data structure.
Linear Data Structure
Imagine a Pile of Plates
Pile is a Stack
Plate as variable
Pile as Data Structure
Cont..
Operations performed on Stacks are:
1. Insert an item into the stack (Store)
2. Delete an item from the stack (Retrieve)
3. Display the contents of the stack
Cont..
Conversion of expressions.
Infix to postfix, postfix to prefix, prefix to infix, vice
versa.
Evaluation of expressions.
Technically,
In many Job Scheduling Algorithm,
Round robin scheduling etc.
Trees
Nature view of a tree
Computer Scientist’s View
What is a Tree
It is an abstract model of a hierarchical
structure
Consists of nodes with a parent child relation
Graph
A data structure that consists of a set of nodes
(vertices) and a set of edges that relate the nodes
to each other
The set of edges describes relationships among the
vertices
Cont..
Facebook is an example of undirected graph
Cont..
Google maps uses graphs for building transportation
systems
Shortest path finding algorithm in maps
Sorting
Arranging a set of data in some logical order
Sorting Techniques
Arranging objects in certain way
-Easy to access(accessibility)
-will the shelf last(hardware’s ability)
-No. of books
The above points are constraints
Ex: Bubble sort , quick sort ,
insertion sort , merge sort
etc.
Searching
Technique that helps in finding the place of a
given element
Searching a book from beginning to last in a
single shelf
… Congrats!!!
You used Linear search
Cont..
What if there are many more books ??
And multiple shelf …???
Cont..
Start searching from a part of shelf
Again sort it and search for book
Congrats...!!!
You used Binary Search
Conclusion
Some of many daily activities knowing or
unknowingly do with the help of Data
Structures and Algorithms
Thus ,this world is surrounded by Data