Summer Training PPT

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 21

DATA

STRUCTURES
AND

DATA STRUCTURES AND ALGORITHMS


ALGORITHMS

TANMAY SAINI
REG NO – 12214619
LOVELY PROFESSIONAL UNIVERSITY
B.TECH IN COMPUTER SCIENCE AND ENGINEERING
CERTIFICATION

DATA STRUCTURES AND ALGORITHMS


INTRODUCTION
 What is an Algorithm?

 An algorithm is a set of well-defined instructions or step to solve a


particular problem. It takes a set of input and produces a desired output.

 FOR EXAMPLE – SEARCHING A PAGE IN A BOOK OF 1000 PAGES

 GO ONE PAGE BY ONE

 ANOTHER COULD BE GO TO A RANDOM PAGE AND LOOK ARE WE AHEAD


OR BEHIND OUR DESIRED PAGE THEN DO SAME WITH REMAING PAGES.

 ALOGORITHM IS A APPROCH TO A PROBEM

DATA STRUCTURES AND ALGORITHMS


Array
Arrays are defined as the
collection of similar type of
data items stored at
contiguous memory
locations. Array is the
simplest data structure
where each data element
can be randomly accessed
by using its index number.

For example, if we want to store the marks of a student in 6


subjects, then we don't need to define different variable for the
marks in different subject. instead of that, we can define an array
which can store the marks in each subject at a the contiguous
memory locations.
DATA STRUCTURES AND ALGORITHMS

An Array is actually a pointer that points to the first element of the array.
Because the array variable is a pointer, you can dereference it, which
Searching 5
 Searching in data-structure refers to the process of finding a desired element

DATA STRUCTURES AND ALGORITHMS


in set of items.
 TYPES OF SEARCHING
 1. Linear Search 2. Binary Search

DATA STRUCTURES AND ALGORITHMS


Sorting
 Sorting Algorithms are methods of reorganizing a large number of items into
some specific order such as highest to lowest, or vice-versa, or even in some
alphabetical order.

DATA STRUCTURES AND ALGORITHMS


Linked List
Linked Lists are linear or sequential
data structures in which elements
are stored at non-contiguous
memory locations and are linked to
each other using pointers.

Types-
1. Singly Linked List
2. Doubly Linked List
3. Circular Linked List

Basic Operations on Linked List. Traversal: To traverse all the


nodes one after another. Insertion: To add a node at the given
position. ... Sorting: To arrange nodes in a linked list in a
specific order.
DATA STRUCTURES AND ALGORITHMS
Stack

The Stack is a linear data structure, which follows a particular order in which
the operations are performed. The order may be LIFO (Last In First Out) or
FILO (First In Last Out).
A real-life example is a stack of plates: you can only take a plate from the
top of the stack, and you can only add a plate to the top of the stack.
DATA STRUCTURES AND ALGORITHMS
APPLICATION- Reverse a Data , Processing Function Calls
QUEUE

A queue is a useful data structure in programming. It is similar to the ticket


queue outside a cinema hall, where the first person entering the queue is
the first person who gets the ticket. Queue follows the First In Fast Out (FIFO)
rule- the item that goes in first is the item that comes out first.
APPLICATION- waiting lists for a single shared resource like printer, disk,
CPU.
Queues
DATA STRUCTURESare used in operating systems for handling interrupts
AND ALGORITHMS
TREE

A Tree is a non-linear data structure where each node is connected to a


number of nodes with the help of pointers or references.
BASIC TREE TERMINOLOGIES:
•Root
•Edge
•Siblings
•Leaf Nodes
DATA STRUCTURES AND ALGORITHMS
BINARY TREE

A Tree is said to be a Binary Tree if all of its nodes have atmost 2 children.
That is, all of its node can have either no child, 1 child, or 2 child nodes.

DATA STRUCTURES AND ALGORITHMS


DATA STRUCTURES AND ALGORITHMS
Heap :

 A heap is a binary tree-based data structure used to maintain a


partially sorted order. It comes in two types:

 Min-Heap: The parent node is always smaller than its children.


 Max-Heap: The parent node is always larger than its children.

DATA STRUCTURES AND ALGORITHMS


Project : TIC TAK TOE SOLVER

DATA STRUCTURES AND ALGORITHMS


DATA STRUCTURES AND ALGORITHMS
DATA STRUCTURES AND ALGORITHMS
DATA STRUCTURES AND ALGORITHMS
DATA STRUCTURES AND ALGORITHMS
DATA STRUCTURES AND ALGORITHMS
Significance and Conclusion

DATA STRUCTURES AND ALGORITHMS


THANK YOU

DATA STRUCTURES AND ALGORITHMS

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy