SlideShare a Scribd company logo
A TRAINING REPORT
Submitted to
LOVELY PROFESSIONAL UNIVERSITY
PHAGWARA, PUNJAB
From 06/05/24 to 07/18/24
SUBMITTED BY
Mansi Sharma
1220777
CERTIFICATE 2
Dr. Sudha Sankar I am deeply grateful to Dr. Sudha Sankar
for his invaluable guidance and support throughout the
internship. His insightful feedback and expert advice were
instrumental in shaping my understanding of complex
algorithms and data structures. His enthusiasm for teaching
and deep knowledge in the field greatly inspired me and
enhanced my learning experience.
3
UNDERSTANDING DATA STRUCTURES
DEFINITION: DATA STRUCTURES ARE ESSENTIAL COMPONENTS IN COMPUTER SCIENCE THAT ENABLE THE
EFFICIENT STORAGE, RETRIEVAL, AND MANIPULATION OF DATA. THEY PROVIDE A WAY TO ORGANIZE AND
MANAGE DATA SO THAT IT CAN BE ACCESSED AND MODIFIED WITH OPTIMAL PERFORMANCE.
TYPES OF DATA STRUCTURES
1. LINEAR DATA STRUCTURES:
ARRAY: AN ARRAY IS A COLLECTION OF ELEMENTS STORED IN CONTIGUOUS MEMORY
LOCATIONS. EACH ELEMENT IN THE ARRAY CAN BE ACCESSED DIRECTLY USING AN INDEX,
MAKING IT EFFICIENT FOR READING AND WRITING DATA.
.
STACK: A STACK OPERATES ON THE LAST IN, FIRST OUT (LIFO) PRINCIPLE, WHERE THE LAST ELEMENT
ADDED IS THE FIRST TO BE REMOVED. THIS STRUCTURE IS PARTICULARLY USEFUL IN SCENARIOS LIKE
FUNCTION CALL MANAGEMENT IN PROGRAMMING LANGUAGES, WHERE THE MOST RECENT FUNCTION
CALL IS THE FIRST TO BE RESOLVED.
QUEUE: A QUEUE FOLLOWS THE FIRST IN, FIRST OUT (FIFO) PRINCIPLE, WHERE THE FIRST ELEMENT
ADDED IS THE FIRST TO BE REMOVED. THIS MAKES QUEUES IDEAL FOR MANAGING TASKS IN ORDER, SUCH
AS IN JOB SCHEDULING SYSTEMS WHERE THE FIRST TASK SUBMITTED IS THE FIRST TO BE EXECUTED.
.
Linked List: Unlike arrays, linked lists store elements in nodes, each of which
contains a reference (or link) to the next node in the sequence. This allows for
dynamic memory allocation, where the list can grow and shrink as needed.
2. Non-Linear Data Structures:
Tree: A tree is a hierarchical data structure that consists of nodes connected by edges.
Each node in a tree has a parent node (except the root node) and zero or more child nodes.
Trees are widely used to represent hierarchical relationships, such as file systems, where
directories contain subdirectories and files. A special type of tree, the Binary Search Tree
(BST), allows for efficient searching, insertion, and deletion operations.
ARRAYS AND LINKED LISTS ARRAYS:
ARRAYS ARE ONE OF THE MOST BASIC AND WIDELY USED DATA STRUCTURES. THEY PROVIDE FAST
ACCESS TO ELEMENTS THROUGH INDEXING, WHICH IS A SIGNIFICANT ADVANTAGE IN SCENARIOS WHERE
QUICK DATA RETRIEVAL IS NECESSARY, SUCH AS IN SEARCHING ALGORITHMS AND DYNAMIC
PROGRAMMING.
LINKED LISTS: LINKED LISTS ARE MORE FLEXIBLE THAN ARRAYS, ALLOWING FOR DYNAMIC MEMORY
ALLOCATION. THIS MAKES THEM IDEAL FOR APPLICATIONS WHERE THE SIZE OF THE DATA STRUCTURE IS
NOT KNOWN IN ADVANCE, OR WHERE FREQUENT INSERTIONS AND DELETIONS ARE REQUIRED.
Memory Usage: Linear data structures like arrays and linked lists have different memory
footprints. Arrays require a contiguous block of memory, which can be inefficient if the
size of the array is overestimated. Linked lists, on the other hand, use memory more
flexibly but require additional space for storing pointers.
QUEUES: QUEUES OPERATE ON THE PRINCIPLE OF FIRST IN, FIRST OUT (FIFO), MEANING THE FIRST ELEMENT
ADDED TO THE QUEUE IS THE FIRST TO BE REMOVED. THIS STRUCTURE IS WIDELY USED IN SCENARIOS WHERE ORDER
NEEDS TO BE PRESERVED, SUCH AS IN JOB SCHEDULING SYSTEMS, WHERE TASKS NEED TO BE PROCESSED IN THE ORDER
THEY ARRIVE.
. TREES AND GRAPHS TREES:
TREES ARE HIERARCHICAL DATA STRUCTURES THAT CONSIST OF NODES CONNECTED BY EDGES. EACH TREE HAS A
ROOT NODE, AND EVERY NODE (EXCEPT THE ROOT) HAS EXACTLY ONE PARENT. THE STRUCTURE OF A TREE RESEMBLES A
BRANCHING STRUCTURE, MAKING IT IDEAL FOR REPRESENTING HIERARCHICAL RELATIONSHIPS.
GRAPHS: GRAPHS ARE VERSATILE DATA STRUCTURES USED TO MODEL RELATIONSHIPS BETWEEN ENTITIES. A GRAPH
CONSISTS OF A SET OF VERTICES (NODES) CONNECTED BY EDGES.
Stacks and Queues Stacks:
Stacks: Stacks are a fundamental data structure used in various computing applications.
They operate on the principle of Last In, First Out (LIFO), meaning the last element added
to the stack is the first to be removed.
HASH TABLES: A HASH TABLE IS A DATA STRUCTURE THAT IMPLEMENTS AN
ASSOCIATIVE ARRAY, MAPPING KEYS TO VALUES. HASH TABLES ARE HIGHLY
EFFICIENT, WITH AN AVERAGE TIME COMPLEXITY OF O(1) FOR BOTH INSERTIONS
AND LOOKUPS, MAKING THEM IDEAL FOR APPLICATIONS LIKE DATABASES,
CACHING, AND IMPLEMENTING DYNAMIC DICTIONARIES.
SORTING ALGORITHMS
BUBBLE SORT BUBBLE SORT IS A SIMPLE SORTING ALGORITHM THAT REPEATEDLY
STEPS THROUGH THE LIST, COMPARES ADJACENT ELEMENTS, AND SWAPS THEM IF
THEY ARE IN THE WRONG ORDER. THIS PROCESS CONTINUES UNTIL THE LIST IS
SORTED.
Hashing: Hashing is a technique used to map data of arbitrary size to fixed
size values, known as hash codes. These hash codes are then used as indices in a
hash table, where the corresponding data is stored.
Quick Sort Quick Sort is a divide-and-conquer algorithm
that selects a 'pivot' element and partitions the array into
elements less than and greater than the pivot. It then
recursively sorts the sub-arrays.
Searching Algorithms
Linear Search Linear Search scans each element in the
array sequentially until the desired element is found.
Binary Search
Binary Search works on sorted arrays by repeatedly
dividing the search interval in half.
ALGORITHM COMPLEXITY AND BIG O
NOTATION
• Big O Notation describes the upper bound of the time complexity of
an algorithm. It provides an asymptotic analysis of the algorithm's
performance.
• O(1): Constant time complexity.
• O(n): Linear time complexity.
• O(n^2): Quadratic time complexity.
• O(log n): Logarithmic time complexity.
11
THANK YOU!!

More Related Content

PPTX
DSA.pptx based on basic dsa concepts for engineers
PDF
Data structures
PPT
Struktur data ppt
PPTX
Basic of Data Structure.pptx
PPTX
Basic of Data Structure.pptx
PDF
Data File Structures Notes {dfs} MOD.pdf
PDF
Data Structure the Basic Structure for Programming
PDF
Efficient Memory Management with Data Structures - Hiike
DSA.pptx based on basic dsa concepts for engineers
Data structures
Struktur data ppt
Basic of Data Structure.pptx
Basic of Data Structure.pptx
Data File Structures Notes {dfs} MOD.pdf
Data Structure the Basic Structure for Programming
Efficient Memory Management with Data Structures - Hiike

Similar to viva.pdfjgthjghngnfgnfgnhfnhvndrcfbdrfgd (20)

PPTX
data science
PPTX
Circular Linked List.pptx
PPT
3620121datastructures.ppt
PPTX
Introduction-to-Trees-in-Data-Structures-and-Algorithms[1].pptx
PDF
Data Structure the Basic Structure for Programming
PPTX
Introduction of Data Structure
PPTX
Organisation of database vs Organisation of database
PPTX
Presentations, Documents, Infographics, and more
PPTX
ntroduction of Algorithms, Analysing Algorithms. Arrays: Sparse Matrices - Re...
PPTX
Data- Structures-Binary-Search-Trees.pptx
PDF
Indexing techniques
PPT
Presentation on data structure And algorithms
PPTX
DataStructureccvdgddfffdesddsssdssPpt.pptx
PPTX
Introduction to data structures (ss)
DOCX
Data structures 1
PPTX
DataStructurePpt.pptx
PPT
Data Structures: A Foundation for Efficient Programming
PPTX
Unit 1 Introduction to Oracle and sql (6).pptx
PPT
data structures
PPT
PPT_DATA STRUCTURE.ppt
data science
Circular Linked List.pptx
3620121datastructures.ppt
Introduction-to-Trees-in-Data-Structures-and-Algorithms[1].pptx
Data Structure the Basic Structure for Programming
Introduction of Data Structure
Organisation of database vs Organisation of database
Presentations, Documents, Infographics, and more
ntroduction of Algorithms, Analysing Algorithms. Arrays: Sparse Matrices - Re...
Data- Structures-Binary-Search-Trees.pptx
Indexing techniques
Presentation on data structure And algorithms
DataStructureccvdgddfffdesddsssdssPpt.pptx
Introduction to data structures (ss)
Data structures 1
DataStructurePpt.pptx
Data Structures: A Foundation for Efficient Programming
Unit 1 Introduction to Oracle and sql (6).pptx
data structures
PPT_DATA STRUCTURE.ppt
Ad

Recently uploaded (20)

PPTX
The Stock at arrangement the stock and product.pptx
PPTX
Overview Planner of Soft Skills in a single ppt
PPTX
cse couse aefrfrqewrbqwrgbqgvq2w3vqbvq23rbgw3rnw345
PPTX
Cerebral_Palsy_Detailed_Presentation.pptx
PDF
313302 DBMS UNIT 1 PPT for diploma Computer Eng Unit 2
PPTX
Definition and Relation of Food Science( Lecture1).pptx
PPTX
OnePlus 13R – ⚡ All-Rounder King Performance: Snapdragon 8 Gen 3 – same as iQ...
PDF
Understanding the Rhetorical Situation Presentation in Blue Orange Muted Il_2...
PPTX
Autonomic_Nervous_SystemM_Drugs_PPT.pptx
PPT
APPROACH TO DEVELOPMENTALlllllllllllllllll
PDF
Blue-Modern-Elegant-Presentation (1).pdf
PDF
Entrepreneurship PowerPoint for students
PPTX
_+✅+JANUARY+2025+MONTHLY+CA.pptx current affairs
PPTX
microtomy kkk. presenting to cryst in gl
PPTX
FINAL PPT.pptx cfyufuyfuyuy8ioyoiuvy ituyc utdfm v
PPTX
DPT-MAY24.pptx for review and ucploading
PDF
Why Today’s Brands Need ORM & SEO Specialists More Than Ever.pdf
PPTX
退学买新西兰毕业证(WelTec毕业证书)惠灵顿理工学院毕业证国外证书制作
PPTX
ESD MODULE-5hdbdhbdbdbdbbdbdbbdndbdbdbdbbdbd
PDF
Daisia Frank: Strategy-Driven Real Estate with Heart.pdf
The Stock at arrangement the stock and product.pptx
Overview Planner of Soft Skills in a single ppt
cse couse aefrfrqewrbqwrgbqgvq2w3vqbvq23rbgw3rnw345
Cerebral_Palsy_Detailed_Presentation.pptx
313302 DBMS UNIT 1 PPT for diploma Computer Eng Unit 2
Definition and Relation of Food Science( Lecture1).pptx
OnePlus 13R – ⚡ All-Rounder King Performance: Snapdragon 8 Gen 3 – same as iQ...
Understanding the Rhetorical Situation Presentation in Blue Orange Muted Il_2...
Autonomic_Nervous_SystemM_Drugs_PPT.pptx
APPROACH TO DEVELOPMENTALlllllllllllllllll
Blue-Modern-Elegant-Presentation (1).pdf
Entrepreneurship PowerPoint for students
_+✅+JANUARY+2025+MONTHLY+CA.pptx current affairs
microtomy kkk. presenting to cryst in gl
FINAL PPT.pptx cfyufuyfuyuy8ioyoiuvy ituyc utdfm v
DPT-MAY24.pptx for review and ucploading
Why Today’s Brands Need ORM & SEO Specialists More Than Ever.pdf
退学买新西兰毕业证(WelTec毕业证书)惠灵顿理工学院毕业证国外证书制作
ESD MODULE-5hdbdhbdbdbdbbdbdbbdndbdbdbdbbdbd
Daisia Frank: Strategy-Driven Real Estate with Heart.pdf
Ad

viva.pdfjgthjghngnfgnfgnhfnhvndrcfbdrfgd

  • 1. A TRAINING REPORT Submitted to LOVELY PROFESSIONAL UNIVERSITY PHAGWARA, PUNJAB From 06/05/24 to 07/18/24 SUBMITTED BY Mansi Sharma 1220777
  • 3. Dr. Sudha Sankar I am deeply grateful to Dr. Sudha Sankar for his invaluable guidance and support throughout the internship. His insightful feedback and expert advice were instrumental in shaping my understanding of complex algorithms and data structures. His enthusiasm for teaching and deep knowledge in the field greatly inspired me and enhanced my learning experience. 3
  • 4. UNDERSTANDING DATA STRUCTURES DEFINITION: DATA STRUCTURES ARE ESSENTIAL COMPONENTS IN COMPUTER SCIENCE THAT ENABLE THE EFFICIENT STORAGE, RETRIEVAL, AND MANIPULATION OF DATA. THEY PROVIDE A WAY TO ORGANIZE AND MANAGE DATA SO THAT IT CAN BE ACCESSED AND MODIFIED WITH OPTIMAL PERFORMANCE. TYPES OF DATA STRUCTURES 1. LINEAR DATA STRUCTURES: ARRAY: AN ARRAY IS A COLLECTION OF ELEMENTS STORED IN CONTIGUOUS MEMORY LOCATIONS. EACH ELEMENT IN THE ARRAY CAN BE ACCESSED DIRECTLY USING AN INDEX, MAKING IT EFFICIENT FOR READING AND WRITING DATA. .
  • 5. STACK: A STACK OPERATES ON THE LAST IN, FIRST OUT (LIFO) PRINCIPLE, WHERE THE LAST ELEMENT ADDED IS THE FIRST TO BE REMOVED. THIS STRUCTURE IS PARTICULARLY USEFUL IN SCENARIOS LIKE FUNCTION CALL MANAGEMENT IN PROGRAMMING LANGUAGES, WHERE THE MOST RECENT FUNCTION CALL IS THE FIRST TO BE RESOLVED. QUEUE: A QUEUE FOLLOWS THE FIRST IN, FIRST OUT (FIFO) PRINCIPLE, WHERE THE FIRST ELEMENT ADDED IS THE FIRST TO BE REMOVED. THIS MAKES QUEUES IDEAL FOR MANAGING TASKS IN ORDER, SUCH AS IN JOB SCHEDULING SYSTEMS WHERE THE FIRST TASK SUBMITTED IS THE FIRST TO BE EXECUTED.
  • 6. . Linked List: Unlike arrays, linked lists store elements in nodes, each of which contains a reference (or link) to the next node in the sequence. This allows for dynamic memory allocation, where the list can grow and shrink as needed. 2. Non-Linear Data Structures: Tree: A tree is a hierarchical data structure that consists of nodes connected by edges. Each node in a tree has a parent node (except the root node) and zero or more child nodes. Trees are widely used to represent hierarchical relationships, such as file systems, where directories contain subdirectories and files. A special type of tree, the Binary Search Tree (BST), allows for efficient searching, insertion, and deletion operations.
  • 7. ARRAYS AND LINKED LISTS ARRAYS: ARRAYS ARE ONE OF THE MOST BASIC AND WIDELY USED DATA STRUCTURES. THEY PROVIDE FAST ACCESS TO ELEMENTS THROUGH INDEXING, WHICH IS A SIGNIFICANT ADVANTAGE IN SCENARIOS WHERE QUICK DATA RETRIEVAL IS NECESSARY, SUCH AS IN SEARCHING ALGORITHMS AND DYNAMIC PROGRAMMING. LINKED LISTS: LINKED LISTS ARE MORE FLEXIBLE THAN ARRAYS, ALLOWING FOR DYNAMIC MEMORY ALLOCATION. THIS MAKES THEM IDEAL FOR APPLICATIONS WHERE THE SIZE OF THE DATA STRUCTURE IS NOT KNOWN IN ADVANCE, OR WHERE FREQUENT INSERTIONS AND DELETIONS ARE REQUIRED. Memory Usage: Linear data structures like arrays and linked lists have different memory footprints. Arrays require a contiguous block of memory, which can be inefficient if the size of the array is overestimated. Linked lists, on the other hand, use memory more flexibly but require additional space for storing pointers.
  • 8. QUEUES: QUEUES OPERATE ON THE PRINCIPLE OF FIRST IN, FIRST OUT (FIFO), MEANING THE FIRST ELEMENT ADDED TO THE QUEUE IS THE FIRST TO BE REMOVED. THIS STRUCTURE IS WIDELY USED IN SCENARIOS WHERE ORDER NEEDS TO BE PRESERVED, SUCH AS IN JOB SCHEDULING SYSTEMS, WHERE TASKS NEED TO BE PROCESSED IN THE ORDER THEY ARRIVE. . TREES AND GRAPHS TREES: TREES ARE HIERARCHICAL DATA STRUCTURES THAT CONSIST OF NODES CONNECTED BY EDGES. EACH TREE HAS A ROOT NODE, AND EVERY NODE (EXCEPT THE ROOT) HAS EXACTLY ONE PARENT. THE STRUCTURE OF A TREE RESEMBLES A BRANCHING STRUCTURE, MAKING IT IDEAL FOR REPRESENTING HIERARCHICAL RELATIONSHIPS. GRAPHS: GRAPHS ARE VERSATILE DATA STRUCTURES USED TO MODEL RELATIONSHIPS BETWEEN ENTITIES. A GRAPH CONSISTS OF A SET OF VERTICES (NODES) CONNECTED BY EDGES. Stacks and Queues Stacks: Stacks: Stacks are a fundamental data structure used in various computing applications. They operate on the principle of Last In, First Out (LIFO), meaning the last element added to the stack is the first to be removed.
  • 9. HASH TABLES: A HASH TABLE IS A DATA STRUCTURE THAT IMPLEMENTS AN ASSOCIATIVE ARRAY, MAPPING KEYS TO VALUES. HASH TABLES ARE HIGHLY EFFICIENT, WITH AN AVERAGE TIME COMPLEXITY OF O(1) FOR BOTH INSERTIONS AND LOOKUPS, MAKING THEM IDEAL FOR APPLICATIONS LIKE DATABASES, CACHING, AND IMPLEMENTING DYNAMIC DICTIONARIES. SORTING ALGORITHMS BUBBLE SORT BUBBLE SORT IS A SIMPLE SORTING ALGORITHM THAT REPEATEDLY STEPS THROUGH THE LIST, COMPARES ADJACENT ELEMENTS, AND SWAPS THEM IF THEY ARE IN THE WRONG ORDER. THIS PROCESS CONTINUES UNTIL THE LIST IS SORTED. Hashing: Hashing is a technique used to map data of arbitrary size to fixed size values, known as hash codes. These hash codes are then used as indices in a hash table, where the corresponding data is stored.
  • 10. Quick Sort Quick Sort is a divide-and-conquer algorithm that selects a 'pivot' element and partitions the array into elements less than and greater than the pivot. It then recursively sorts the sub-arrays. Searching Algorithms Linear Search Linear Search scans each element in the array sequentially until the desired element is found. Binary Search Binary Search works on sorted arrays by repeatedly dividing the search interval in half.
  • 11. ALGORITHM COMPLEXITY AND BIG O NOTATION • Big O Notation describes the upper bound of the time complexity of an algorithm. It provides an asymptotic analysis of the algorithm's performance. • O(1): Constant time complexity. • O(n): Linear time complexity. • O(n^2): Quadratic time complexity. • O(log n): Logarithmic time complexity. 11