SlideShare a Scribd company logo
CSE-443
SUMMER INTERNSHIP
ON
DATA STRUCTURE AND ALGORITHMS (GFG)
Presented by :-
Name: I.Jayakrishna Reddy
Reg. No.: 11913860
Topics Covered
INTRODUCTION
DATA STRUCTURES
i. Asymptotic Notations
ii. Time Complexity
iii. Arrays, Trees, Linked List, etc.
ALGORITHMS
CONCLUSION
INTRODUCTION
 A computer program is a collection of instructions to perform a specific task. For this, a computer program may need to store
data, retrieve data, and perform computations on the data.
 A data structure is a named location that can be used to store and organize data. And, an algorithm is a collection of steps to
solve a particular problem. Learning data structures and algorithms allow us to write efficient and optimized computer
programs.
 An algorithm is a set of well-defined instructions in sequence to solve a problem.
Asymptotic Notation
 Asymptotic notations are mathematical tools to represent the time complexity of
algorithms for asymptotic analysis.
 Types of Asymptotic notation:
 Big Oh notation:
It represents the upper bound of the running time of an algorithm. Thus, it gives the worst case complexity of
an algorithm.
 Big Theta notation:
It encloses the function from above and below. Since it represents the upper and the lower bound of the running
time of an algorithm, it is used for analyzing the average case complexity of an algorithm.
 Big Omega notation:
It represents the lower bound of the running time of an algorithm. Thus, it provides best case complexity of an
algorithm.
(i)Big O (ii)Big Theta (iii)Big Omega
Time Complexity
 Time complexity of an algorithm signifies the total time required by the program
to run till its completion.
 Types of Time complexity:
 Worst Case:
In the worst case analysis, we calculate upper bound on running time of an
algorithm.
 Average case:
In average case analysis, we take all possible inputs and calculate computing
time for all of the inputs.
 Best case:
In the best case analysis, we calculate lower bound on running time of an
algorithm
ARRAYS
 An array is a collection of items of same data type stored at contiguous
memory locations.
 Location of the next element depends on the datatype of the element.
 Arrays allows to access elements randomly. Elements in an array can be
accessed using indexes.
 It gives a better performance as access time become faster because we can
randomly access the elements and its an advantage of array.
 Operations like searching, insertion, deletion, reversing we can with array.
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 terminologies in tree: root node, leaf node, edge, siblings, height
of tree, etc.
 Special case of tree: Binary tree
 A Tree is said to be a Binary Tree if all of its nodes have at most 2
children i.e. all of its node can have either no child, 1 child or 2 child
nodes.
 Types of binary tree: Full binary tree, Complete binary tree, Perfect
binary tree.
 Operations on tree are Traversal, Insertion, Deletion, etc.
LINKED LIST
 Linked Lists are linear or sequential data structures in which elements are stored
at non-contiguous memory location and are linked to each other using pointers.
 Each linked list has two parts :
 Data
 Next pointer
 Types of linked list:
 Singly linked list
 Doubly linked list
 Circular linked list
 Operations are like searching, insertion and deletion, etc.
STRINGS
 Strings are defined as a stream of characters.
 Strings are used to represent text and are generally represented by enclosing text
within quotes.
 In java, objects of string are immutable which means a constant and cannot be
changed once created.
 Some methods in strings:
 Finding the length and substring
 Index of string,
 Concatenating two strings
 Comparing two strings, Uppercase, Lowercase, Trim and Replace.
 Searching algorithms:
 Naïve pattern searching: O(m*(n-m+1))
STACK
 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).
 The LIFO order says that the element which is inserted at the last in the Stack
will be the first one to be removed. In LIFO order insertion takes place at the rear
end of the stack and deletion occurs at the front of the stack.
 Operations such as push, pop, etc. are performed.
 It can be implemented in two ways using arrays and linked list.
 Pros: Easy to implement. Memory is saved as pointers are not involved.
 Cons: It is not dynamic. It doesn’t grow and shrink depending on needs at
runtime.
QUEUE
 Queue is also a linear data structure which follows a particular order in which the operations are performed.
 The order is First In First Out (FIFO) which means that the element which is inserted first in the queue will
be the first one to be removed from the queue.
 Operations:
 Enqueue: Adds an item to the queue. If the queue is full, then it is said to be an Overflow Condition.
 Dequeue: Removes an item from the queue. The items are popped in the same order in which they are pushed. If the
queue is empty, then it is said to be an Underflow Condition.
 Front: Get the front item from queue.
 Rear: Get the last item from queue.
GRAPH
 A graph is a data structure that consists of the following two components:
 A finite set of vertices also called nodes.
 A finite set of ordered pair of the form (u, v) called as edge.
 Two types of graph:
 Directed graph : The Directed graphs are such graphs in which edges are directed in a single
direction.
 Undirected graph: Undirected graphs are such graphs in which the edges are directionless or
in other words bi-directional.
 Operations such as Traversal(two types)
 Breadth first traversal
 Depth first traversal
ALGORITHMS
Qualities of Good Algorithm
Searching
Recursion
Sorting
Insertion
Deletion , etc.
QUALITIES OF GOOD
ALGORITHM
 Input and output should be defined precisely.
 Each step in the algorithm should be clear and unambiguous.
 Algorithms should be most effective among many different ways to solve a problem.
 An algorithm shouldn't include computer code.
 The algorithm should be written in such a way that it can be used in different
programming languages.
SEARCHING
 Searching means searching a particular element in any data structure.
 Two types:
1. Linear search:
i. It is also known as sequential search.
ii. Time complexity: O(n)
2. Binary search:
i. It performs the search operation by repeatedly dividing the search
interval in half.
ii. It performed only on sorted arrays and it is also more efficient than the
linear search algorithm.
iii. Time complexity: O(Log n)
RECURSION
 The process in which a function calls itself directly or indirectly
is called recursion and the corresponding function is called as
recursive function.
 Recursion algorithm must have base condition in recursive
program, the solution to base case is provided and solution of
bigger problem is expressed in terms of smaller problems.
 Pros:
 Recursion provides a simple and clean way to write codes.
 Cons:
 It takes greater space and also greater time for processing.
SORTING
 Sorting any sequence means to arrange the elements of that
sequence according to some specific criterion.
 Types:
► Insertion sort: O(n^2)
► Selection sort: O(n^2)
► Bubble sort: O(n^2)
► Quick sort: O(n^2)
► Merge sort: O(log n)
CSE 443 (1).pptx
CSE 443 (1).pptx

More Related Content

PPSX
Stacks Implementation and Examples
greatqadirgee4u
 
PPTX
Data structfghz€zdsrgnhlhlfdshllures.pptx
srahul53094
 
PPTX
project on data structures and algorithm
AnujKumar566766
 
PDF
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Axmedcarb
 
PPT
Data structures
Manaswi Sharma
 
DOCX
Data structure and algorithm.
Abdul salam
 
PPTX
Array Data StructureData StructureData Structure.pptx
menukam354
 
PPTX
1-Introduction to Data Structures beginner.pptx
231b209
 
Stacks Implementation and Examples
greatqadirgee4u
 
Data structfghz€zdsrgnhlhlfdshllures.pptx
srahul53094
 
project on data structures and algorithm
AnujKumar566766
 
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Axmedcarb
 
Data structures
Manaswi Sharma
 
Data structure and algorithm.
Abdul salam
 
Array Data StructureData StructureData Structure.pptx
menukam354
 
1-Introduction to Data Structures beginner.pptx
231b209
 

Similar to CSE 443 (1).pptx (20)

PPTX
data structures module I & II.pptx
rani marri
 
PPT
Ch 1 intriductions
irshad17
 
PDF
Lec01-Algorithems - Introduction and Overview.pdf
MAJDABDALLAH3
 
PPTX
Review to the data structure and algorithm
lochanraj1
 
PPTX
Data structures - Introduction
DeepaThirumurugan
 
PPTX
Data Structures in C
Jabs6
 
PPTX
هياكلبيانات
Rafal Edward
 
PPT
intr_ds.ppt
PrakharNamdev3
 
PPTX
19. Java data structures algorithms and complexity
Intro C# Book
 
DOC
Course module of DS
PCTE
 
PPTX
Data_structures_and_algorithm_Lec_1.pptx
aamirali1061a
 
PPTX
Data_structures_and_algorithm_Lec_1.pptx
aamirali1061a
 
PDF
viva.pdfjgthjghngnfgnfgnhfnhvndrcfbdrfgd
YashVerma195227
 
PPTX
data science
KamleshParihar12
 
PDF
Data Structures & Algorithms - Spring 2025.pdf
Syed Zaid Irshad
 
PPTX
19. Data Structures and Algorithm Complexity
Intro C# Book
 
PPTX
Data Structures unit I Introduction - data types
AmirthaVarshini80
 
PPT
C++ Data Structure PPT.ppt
Mukesh Thakur
 
PPTX
RAJAT PROJECT.pptx
SayedMohdAsim2
 
PPTX
Review of basic data structures
Deepa Rani
 
data structures module I & II.pptx
rani marri
 
Ch 1 intriductions
irshad17
 
Lec01-Algorithems - Introduction and Overview.pdf
MAJDABDALLAH3
 
Review to the data structure and algorithm
lochanraj1
 
Data structures - Introduction
DeepaThirumurugan
 
Data Structures in C
Jabs6
 
هياكلبيانات
Rafal Edward
 
intr_ds.ppt
PrakharNamdev3
 
19. Java data structures algorithms and complexity
Intro C# Book
 
Course module of DS
PCTE
 
Data_structures_and_algorithm_Lec_1.pptx
aamirali1061a
 
Data_structures_and_algorithm_Lec_1.pptx
aamirali1061a
 
viva.pdfjgthjghngnfgnfgnhfnhvndrcfbdrfgd
YashVerma195227
 
data science
KamleshParihar12
 
Data Structures & Algorithms - Spring 2025.pdf
Syed Zaid Irshad
 
19. Data Structures and Algorithm Complexity
Intro C# Book
 
Data Structures unit I Introduction - data types
AmirthaVarshini80
 
C++ Data Structure PPT.ppt
Mukesh Thakur
 
RAJAT PROJECT.pptx
SayedMohdAsim2
 
Review of basic data structures
Deepa Rani
 
Ad

Recently uploaded (20)

PDF
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PDF
Zero carbon Building Design Guidelines V4
BassemOsman1
 
PPTX
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
PPTX
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
PPTX
Tunnel Ventilation System in Kanpur Metro
220105053
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PDF
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
PPTX
Inventory management chapter in automation and robotics.
atisht0104
 
PDF
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
PPTX
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
PDF
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PPTX
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
PDF
STUDY OF NOVEL CHANNEL MATERIALS USING III-V COMPOUNDS WITH VARIOUS GATE DIEL...
ijoejnl
 
PPTX
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
PDF
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
Zero carbon Building Design Guidelines V4
BassemOsman1
 
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
Tunnel Ventilation System in Kanpur Metro
220105053
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
Inventory management chapter in automation and robotics.
atisht0104
 
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
STUDY OF NOVEL CHANNEL MATERIALS USING III-V COMPOUNDS WITH VARIOUS GATE DIEL...
ijoejnl
 
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
Ad

CSE 443 (1).pptx

  • 1. CSE-443 SUMMER INTERNSHIP ON DATA STRUCTURE AND ALGORITHMS (GFG) Presented by :- Name: I.Jayakrishna Reddy Reg. No.: 11913860
  • 2. Topics Covered INTRODUCTION DATA STRUCTURES i. Asymptotic Notations ii. Time Complexity iii. Arrays, Trees, Linked List, etc. ALGORITHMS CONCLUSION
  • 3. INTRODUCTION  A computer program is a collection of instructions to perform a specific task. For this, a computer program may need to store data, retrieve data, and perform computations on the data.  A data structure is a named location that can be used to store and organize data. And, an algorithm is a collection of steps to solve a particular problem. Learning data structures and algorithms allow us to write efficient and optimized computer programs.  An algorithm is a set of well-defined instructions in sequence to solve a problem.
  • 4. Asymptotic Notation  Asymptotic notations are mathematical tools to represent the time complexity of algorithms for asymptotic analysis.  Types of Asymptotic notation:  Big Oh notation: It represents the upper bound of the running time of an algorithm. Thus, it gives the worst case complexity of an algorithm.  Big Theta notation: It encloses the function from above and below. Since it represents the upper and the lower bound of the running time of an algorithm, it is used for analyzing the average case complexity of an algorithm.  Big Omega notation: It represents the lower bound of the running time of an algorithm. Thus, it provides best case complexity of an algorithm.
  • 5. (i)Big O (ii)Big Theta (iii)Big Omega
  • 6. Time Complexity  Time complexity of an algorithm signifies the total time required by the program to run till its completion.  Types of Time complexity:  Worst Case: In the worst case analysis, we calculate upper bound on running time of an algorithm.  Average case: In average case analysis, we take all possible inputs and calculate computing time for all of the inputs.  Best case: In the best case analysis, we calculate lower bound on running time of an algorithm
  • 7. ARRAYS  An array is a collection of items of same data type stored at contiguous memory locations.  Location of the next element depends on the datatype of the element.  Arrays allows to access elements randomly. Elements in an array can be accessed using indexes.  It gives a better performance as access time become faster because we can randomly access the elements and its an advantage of array.  Operations like searching, insertion, deletion, reversing we can with array.
  • 8. 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 terminologies in tree: root node, leaf node, edge, siblings, height of tree, etc.  Special case of tree: Binary tree  A Tree is said to be a Binary Tree if all of its nodes have at most 2 children i.e. all of its node can have either no child, 1 child or 2 child nodes.  Types of binary tree: Full binary tree, Complete binary tree, Perfect binary tree.  Operations on tree are Traversal, Insertion, Deletion, etc.
  • 9. LINKED LIST  Linked Lists are linear or sequential data structures in which elements are stored at non-contiguous memory location and are linked to each other using pointers.  Each linked list has two parts :  Data  Next pointer  Types of linked list:  Singly linked list  Doubly linked list  Circular linked list  Operations are like searching, insertion and deletion, etc.
  • 10. STRINGS  Strings are defined as a stream of characters.  Strings are used to represent text and are generally represented by enclosing text within quotes.  In java, objects of string are immutable which means a constant and cannot be changed once created.  Some methods in strings:  Finding the length and substring  Index of string,  Concatenating two strings  Comparing two strings, Uppercase, Lowercase, Trim and Replace.  Searching algorithms:  Naïve pattern searching: O(m*(n-m+1))
  • 11. STACK  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).  The LIFO order says that the element which is inserted at the last in the Stack will be the first one to be removed. In LIFO order insertion takes place at the rear end of the stack and deletion occurs at the front of the stack.  Operations such as push, pop, etc. are performed.  It can be implemented in two ways using arrays and linked list.  Pros: Easy to implement. Memory is saved as pointers are not involved.  Cons: It is not dynamic. It doesn’t grow and shrink depending on needs at runtime.
  • 12. QUEUE  Queue is also a linear data structure which follows a particular order in which the operations are performed.  The order is First In First Out (FIFO) which means that the element which is inserted first in the queue will be the first one to be removed from the queue.  Operations:  Enqueue: Adds an item to the queue. If the queue is full, then it is said to be an Overflow Condition.  Dequeue: Removes an item from the queue. The items are popped in the same order in which they are pushed. If the queue is empty, then it is said to be an Underflow Condition.  Front: Get the front item from queue.  Rear: Get the last item from queue.
  • 13. GRAPH  A graph is a data structure that consists of the following two components:  A finite set of vertices also called nodes.  A finite set of ordered pair of the form (u, v) called as edge.  Two types of graph:  Directed graph : The Directed graphs are such graphs in which edges are directed in a single direction.  Undirected graph: Undirected graphs are such graphs in which the edges are directionless or in other words bi-directional.  Operations such as Traversal(two types)  Breadth first traversal  Depth first traversal
  • 14. ALGORITHMS Qualities of Good Algorithm Searching Recursion Sorting Insertion Deletion , etc.
  • 15. QUALITIES OF GOOD ALGORITHM  Input and output should be defined precisely.  Each step in the algorithm should be clear and unambiguous.  Algorithms should be most effective among many different ways to solve a problem.  An algorithm shouldn't include computer code.  The algorithm should be written in such a way that it can be used in different programming languages.
  • 16. SEARCHING  Searching means searching a particular element in any data structure.  Two types: 1. Linear search: i. It is also known as sequential search. ii. Time complexity: O(n) 2. Binary search: i. It performs the search operation by repeatedly dividing the search interval in half. ii. It performed only on sorted arrays and it is also more efficient than the linear search algorithm. iii. Time complexity: O(Log n)
  • 17. RECURSION  The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called as recursive function.  Recursion algorithm must have base condition in recursive program, the solution to base case is provided and solution of bigger problem is expressed in terms of smaller problems.  Pros:  Recursion provides a simple and clean way to write codes.  Cons:  It takes greater space and also greater time for processing.
  • 18. SORTING  Sorting any sequence means to arrange the elements of that sequence according to some specific criterion.  Types: ► Insertion sort: O(n^2) ► Selection sort: O(n^2) ► Bubble sort: O(n^2) ► Quick sort: O(n^2) ► Merge sort: O(log n)