SlideShare a Scribd company logo
1 of 31
Ali Abdi Jama
DATA STRUCTURES & Algorithms
Analysis
USING Python
1
Overview
01
01
CHAPTER
Objectives: Introduction of Fundamental
Concepts
3
Overview of Data Structures
Overview of Algorithms
Some Definitions
Need of Data Structures
Advantages of Data Structures
Data Structure Classification
Operations on data structure
Overview of Data Structures
4
A data structure is a collection of data type ‘values’ which
are stored and organized in such a way that it allows for
efficient access and modification. In some cases a data
structure can become the underlying implementation for a
particular data.
It plays a vital role in enhancing the performance of a
software or a program as the main function of the software is
to store and retrieve the user's data as fast as possible
Overview of Data Structures
 Data structure is representation of the logical relationship
existing between individual elements of data.
 In other words, a data structure is a way of organizing all data
items that considers not only the elements stored but also their
relationship to each other.
 Program = Algorithm + Data Structure
5
Overview of Algorithm
 An algorithm is a set of instructions for solving a
problem or accomplishing a task.
 Algorithms are unambiguous specifications for
performing calculation, data processing, automated
reasoning, and other tasks.
6
Categories Of Algorithm
The major categories of algorithms are given below:
 Sort: Algorithm developed for sorting the items in certain order.
 Search: Algorithm developed for searching the items inside a
data structure.
 Delete: Algorithm developed for deleting the existing element
from the data structure.
 Insert: Algorithm developed for inserting an item inside a data
structure.
 Update: Algorithm developed for updating the existing element
inside a data structure.
7
Some Definitions
 Database:
Refers to all data that will be dealt with in particular situation.
We’ll assume that each item in a database has a similar format.
Example: A book using index cards,
 Record:
Records are the units into which a database is divided.
Ex :each card represents a record
8
Some Definitions
 Fields:
A record is usually divided into several fields. Fields hold a
particular kind of data. Example a person’s name, address
 Key:
Search for a record within a database using specific
key world. Eg search : name
9
Need of Data Structures
 As applications are getting complexed and amount of data is
increasing day by day, there may arise the following
problems:
 Processor speed: To handle very large amount of data, high
speed processing is required, but as the data is growing day by
day to the billions of files per entity, processor may fail to
deal with that much amount of data.
10
Need of Data Structures
 Data Search: Consider an inventory size of 106 items in a
store, If our application needs to search for a particular item, it
needs to traverse 106 items every time, results in slowing
down the search process.
 Multiple requests: If thousands of users are searching the
data simultaneously on a web server, then there are the
chances that a very large server can be failed during that
process
11
Need of Data Structures
in order to solve the above problems, data structures are used.
Data is organized to form a data structure in such a way that all
items are not required to be searched and required data can be
searched instantly.
12
Advantages of Data Structures
 Efficiency: Efficiency of a program depends upon the choice of
data structures. For example: suppose, we have some data and
we need to perform the search for a particular record. In that
case, if we organize our data in an array, we will have to search
sequentially element by element. hence, using array may not be
very efficient here. There are better data structures which can
make the search process efficient like binary search tree or hash
tables.
13
Advantages of Data Structures
 Reusability: Data structures are reusable, i.e. once we have
implemented a particular data structure, we can use it at any
other place.
 Abstraction: Data structure is specified by the ADT which
provides a level of abstraction. The client program uses the
data structure through interface only, without getting into the
implementation details.
14
Data Structure Classifications
15
Data structure
Primitive DS Non-Primitive DS
Integer Float Character Pointer
Float
Integer Float
Data Structure Classifications
16
Non-Primitive DS
Linear List Non-Linear List
Array
Link List Stack
Queue Graph Trees
Types Of Data Structure
 A primitive data structure is generally a basic structure
that is usually built into the language, such as an integer,
a float.
 A non-primitive data structure is built out of primitive
data structures linked together in meaningful ways, such
as a or a linked-list, binary search tree, AVL Tree, graph
etc.
17
Types Of Data Structure
Linear Data Structures:
A data structure is called linear if all of its elements are arranged in
the linear order. In linear data structures, the elements are stored in
non-hierarchical way.
Types of Linear Data Structures are given below:
 Arrays: An array is a collection of similar type of data items and
each data item is called an element of the array. The data type of the
element may be any valid data type like char, int, float or double.
18
Types Of Data Structure
 The elements of array share the same variable name but each
one carries a different index number known as subscript. The
array can be one dimensional, two dimensional or
multidimensional.
The individual elements of the array age are:
 age[0], age[1], age[2], age[3],......... age[98], age[99].
19
Types Of Data Structure
 Linked List:
Linked list is a linear data structure which is used to maintain a
list in the memory. It can be seen as the collection of nodes
stored at non-contiguous memory locations. Each node of the
list contains a pointer to its adjacent node.
20
Types Of Data Structure
 Stack: Stack is a data structure in which insertion
and deletion operations are performed at one end
only.
– The insertion operation is referred to as ‘PUSH’ and
deletion operation is referred to as ‘POP’ operation.
– Stack is also called as Last in First out (LIFO) data
structure.
21
Types Of Data Structure
 Queue: The data structure which permits the insertion at one
end and Deletion at another end, known as Queue.
– End at which deletion is occurs is known as FRONT end
and another end at which insertion occurs is known as
REAR end.
– Queue is also called as First in First out (FIFO) data
structure.
22
Types Of Data Structure
 Non Linear Data Structures:
This data structure does not form a sequence i.e. each item or
element is connected with two or more other items in a non-
linear arrangement. The data elements are not arranged in
sequential structure.
23
Types Of Data Structure
 Trees: Trees are multilevel data structures with a hierarchical
relationship among its elements known as nodes. The bottom most
nodes in the hierarchy are called leaf node while the top most node is
called root node. Each node contains pointers to point adjacent nodes.
 Tree data structure is based on the parent-child relationship among the
nodes. Each node in the tree can have more than one children except
the leaf nodes whereas each node can have at most one parent except
the root node.
24
Types Of Data Structure
 Graphs: Graphs can be defined as the pictorial representation
of the set of elements (represented by vertices) connected by
the links known as edges. A graph is different from tree in the
sense that a graph can have cycle while the tree can not have
the one.
25
Operations on data structure
 Searching:
The process of finding the location of an element within
the data structure is called Searching.
There are two algorithms to perform searching, Linear
Search and Binary Search. We will discuss each one of
them later .
26
Operations on data structure
 Insertion:
Insertion can be defined as the process of adding the elements
to the data structure at any location.
 Deletion:
The process of removing an element from the data structure is
called Deletion. We can delete an element from the data
structure at any random location.
27
Operations on data structure
 Searching:
The process of finding the location of an element within
the data structure is called Searching.
There are two algorithms to perform searching, Linear
Search and Binary Search. We will discuss each one of
them later .
28
Operations on data structure
 Traversing: Every data structure contains the set of
data elements. Traversing the data structure means
visiting each element of the data structure in order to
perform some specific operation like searching or
sorting.
29
Operations on data structure
 Sorting: The process of arranging the data structure in a specific
order is known as Sorting. There are many algorithms that can be
used to perform sorting, for example, insertion sort, selection sort,
bubble sort, etc.
 Merging:
When two lists List A and List B of size M and N respectively, of
similar type of elements, clubbed or joined to produce the third list,
List C of size (M+N), then this process is called merging
30
End
?
31

More Related Content

What's hot

Modern Database Systems - Lecture 00
Modern Database Systems - Lecture 00Modern Database Systems - Lecture 00
Modern Database Systems - Lecture 00Michael Mathioudakis
 
Data resource management and DSS
Data resource management and DSSData resource management and DSS
Data resource management and DSSRajThakuri
 
ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1Witoon Thammatuch-aree
 
Ch 8 introduction to data structures
Ch 8 introduction to data structuresCh 8 introduction to data structures
Ch 8 introduction to data structuresChaffey College
 
Elementary data organisation
Elementary data organisationElementary data organisation
Elementary data organisationMuzamil Hussain
 
Data resource management
Data resource managementData resource management
Data resource managementNirajan Silwal
 
Data Structure the Basic Structure for Programming
Data Structure the Basic Structure for ProgrammingData Structure the Basic Structure for Programming
Data Structure the Basic Structure for Programmingpaperpublications3
 
Introduction to Data Structures
Introduction to Data StructuresIntroduction to Data Structures
Introduction to Data Structuresnayanbanik
 
Over view of data structures
Over view of data structuresOver view of data structures
Over view of data structuresNagajothiN1
 
Basics of data structure
Basics of data structureBasics of data structure
Basics of data structureRajendran
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to databaseSuleman Memon
 

What's hot (19)

Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Lecture1 data structure(introduction)
 
Modern Database Systems - Lecture 00
Modern Database Systems - Lecture 00Modern Database Systems - Lecture 00
Modern Database Systems - Lecture 00
 
Data resource management and DSS
Data resource management and DSSData resource management and DSS
Data resource management and DSS
 
ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1
 
Ch 8 introduction to data structures
Ch 8 introduction to data structuresCh 8 introduction to data structures
Ch 8 introduction to data structures
 
Elementary data organisation
Elementary data organisationElementary data organisation
Elementary data organisation
 
Data resource management
Data resource managementData resource management
Data resource management
 
Data Structure the Basic Structure for Programming
Data Structure the Basic Structure for ProgrammingData Structure the Basic Structure for Programming
Data Structure the Basic Structure for Programming
 
Database Concepts
Database ConceptsDatabase Concepts
Database Concepts
 
Data struters
Data strutersData struters
Data struters
 
Introduction to Data Structures
Introduction to Data StructuresIntroduction to Data Structures
Introduction to Data Structures
 
Data structure
Data  structureData  structure
Data structure
 
Database and types of database
Database and types of databaseDatabase and types of database
Database and types of database
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Over view of data structures
Over view of data structuresOver view of data structures
Over view of data structures
 
Basics of data structure
Basics of data structureBasics of data structure
Basics of data structure
 
Lect 1-2
Lect 1-2Lect 1-2
Lect 1-2
 
Lecture 04 data resource management
Lecture 04 data resource managementLecture 04 data resource management
Lecture 04 data resource management
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 

Similar to Ch1

Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresresamplopsurat
 
Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...Tutort Academy
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptxssuser031f35
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptxDCABCA
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxSaralaT3
 
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdfChapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdfAxmedcarb
 
DATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTESDATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTESsuthi
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxsarala9
 
Unit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxUnit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxajajkhan16
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structureadeel hamid
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS Adams Sidibe
 
Data structure (basics)
Data structure (basics)Data structure (basics)
Data structure (basics)ShrushtiGole
 
Data Structures & Recursion-Introduction.pdf
Data Structures & Recursion-Introduction.pdfData Structures & Recursion-Introduction.pdf
Data Structures & Recursion-Introduction.pdfMaryJacob24
 
Data Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptxData Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptxmexiuro901
 

Similar to Ch1 (20)

Datastructures Notes
Datastructures NotesDatastructures Notes
Datastructures Notes
 
DSA - Copy.pptx
DSA - Copy.pptxDSA - Copy.pptx
DSA - Copy.pptx
 
UNIT II.docx
UNIT II.docxUNIT II.docx
UNIT II.docx
 
Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresres
 
Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdfChapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdf
 
DATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTESDATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTES
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
Unit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxUnit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptx
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Data Structures & Algorithms
Data Structures & AlgorithmsData Structures & Algorithms
Data Structures & Algorithms
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS
 
Data structure
Data structureData structure
Data structure
 
UNIT I - Data Structures.pdf
UNIT I - Data Structures.pdfUNIT I - Data Structures.pdf
UNIT I - Data Structures.pdf
 
Data structure (basics)
Data structure (basics)Data structure (basics)
Data structure (basics)
 
Data Structures & Recursion-Introduction.pdf
Data Structures & Recursion-Introduction.pdfData Structures & Recursion-Introduction.pdf
Data Structures & Recursion-Introduction.pdf
 
Data Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptxData Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptx
 

Recently uploaded

Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...ThinkInnovation
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理e4aez8ss
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAbdelrhman abooda
 

Recently uploaded (20)

Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
 

Ch1

  • 1. Ali Abdi Jama DATA STRUCTURES & Algorithms Analysis USING Python 1
  • 3. Objectives: Introduction of Fundamental Concepts 3 Overview of Data Structures Overview of Algorithms Some Definitions Need of Data Structures Advantages of Data Structures Data Structure Classification Operations on data structure
  • 4. Overview of Data Structures 4 A data structure is a collection of data type ‘values’ which are stored and organized in such a way that it allows for efficient access and modification. In some cases a data structure can become the underlying implementation for a particular data. It plays a vital role in enhancing the performance of a software or a program as the main function of the software is to store and retrieve the user's data as fast as possible
  • 5. Overview of Data Structures  Data structure is representation of the logical relationship existing between individual elements of data.  In other words, a data structure is a way of organizing all data items that considers not only the elements stored but also their relationship to each other.  Program = Algorithm + Data Structure 5
  • 6. Overview of Algorithm  An algorithm is a set of instructions for solving a problem or accomplishing a task.  Algorithms are unambiguous specifications for performing calculation, data processing, automated reasoning, and other tasks. 6
  • 7. Categories Of Algorithm The major categories of algorithms are given below:  Sort: Algorithm developed for sorting the items in certain order.  Search: Algorithm developed for searching the items inside a data structure.  Delete: Algorithm developed for deleting the existing element from the data structure.  Insert: Algorithm developed for inserting an item inside a data structure.  Update: Algorithm developed for updating the existing element inside a data structure. 7
  • 8. Some Definitions  Database: Refers to all data that will be dealt with in particular situation. We’ll assume that each item in a database has a similar format. Example: A book using index cards,  Record: Records are the units into which a database is divided. Ex :each card represents a record 8
  • 9. Some Definitions  Fields: A record is usually divided into several fields. Fields hold a particular kind of data. Example a person’s name, address  Key: Search for a record within a database using specific key world. Eg search : name 9
  • 10. Need of Data Structures  As applications are getting complexed and amount of data is increasing day by day, there may arise the following problems:  Processor speed: To handle very large amount of data, high speed processing is required, but as the data is growing day by day to the billions of files per entity, processor may fail to deal with that much amount of data. 10
  • 11. Need of Data Structures  Data Search: Consider an inventory size of 106 items in a store, If our application needs to search for a particular item, it needs to traverse 106 items every time, results in slowing down the search process.  Multiple requests: If thousands of users are searching the data simultaneously on a web server, then there are the chances that a very large server can be failed during that process 11
  • 12. Need of Data Structures in order to solve the above problems, data structures are used. Data is organized to form a data structure in such a way that all items are not required to be searched and required data can be searched instantly. 12
  • 13. Advantages of Data Structures  Efficiency: Efficiency of a program depends upon the choice of data structures. For example: suppose, we have some data and we need to perform the search for a particular record. In that case, if we organize our data in an array, we will have to search sequentially element by element. hence, using array may not be very efficient here. There are better data structures which can make the search process efficient like binary search tree or hash tables. 13
  • 14. Advantages of Data Structures  Reusability: Data structures are reusable, i.e. once we have implemented a particular data structure, we can use it at any other place.  Abstraction: Data structure is specified by the ADT which provides a level of abstraction. The client program uses the data structure through interface only, without getting into the implementation details. 14
  • 15. Data Structure Classifications 15 Data structure Primitive DS Non-Primitive DS Integer Float Character Pointer Float Integer Float
  • 16. Data Structure Classifications 16 Non-Primitive DS Linear List Non-Linear List Array Link List Stack Queue Graph Trees
  • 17. Types Of Data Structure  A primitive data structure is generally a basic structure that is usually built into the language, such as an integer, a float.  A non-primitive data structure is built out of primitive data structures linked together in meaningful ways, such as a or a linked-list, binary search tree, AVL Tree, graph etc. 17
  • 18. Types Of Data Structure Linear Data Structures: A data structure is called linear if all of its elements are arranged in the linear order. In linear data structures, the elements are stored in non-hierarchical way. Types of Linear Data Structures are given below:  Arrays: An array is a collection of similar type of data items and each data item is called an element of the array. The data type of the element may be any valid data type like char, int, float or double. 18
  • 19. Types Of Data Structure  The elements of array share the same variable name but each one carries a different index number known as subscript. The array can be one dimensional, two dimensional or multidimensional. The individual elements of the array age are:  age[0], age[1], age[2], age[3],......... age[98], age[99]. 19
  • 20. Types Of Data Structure  Linked List: Linked list is a linear data structure which is used to maintain a list in the memory. It can be seen as the collection of nodes stored at non-contiguous memory locations. Each node of the list contains a pointer to its adjacent node. 20
  • 21. Types Of Data Structure  Stack: Stack is a data structure in which insertion and deletion operations are performed at one end only. – The insertion operation is referred to as ‘PUSH’ and deletion operation is referred to as ‘POP’ operation. – Stack is also called as Last in First out (LIFO) data structure. 21
  • 22. Types Of Data Structure  Queue: The data structure which permits the insertion at one end and Deletion at another end, known as Queue. – End at which deletion is occurs is known as FRONT end and another end at which insertion occurs is known as REAR end. – Queue is also called as First in First out (FIFO) data structure. 22
  • 23. Types Of Data Structure  Non Linear Data Structures: This data structure does not form a sequence i.e. each item or element is connected with two or more other items in a non- linear arrangement. The data elements are not arranged in sequential structure. 23
  • 24. Types Of Data Structure  Trees: Trees are multilevel data structures with a hierarchical relationship among its elements known as nodes. The bottom most nodes in the hierarchy are called leaf node while the top most node is called root node. Each node contains pointers to point adjacent nodes.  Tree data structure is based on the parent-child relationship among the nodes. Each node in the tree can have more than one children except the leaf nodes whereas each node can have at most one parent except the root node. 24
  • 25. Types Of Data Structure  Graphs: Graphs can be defined as the pictorial representation of the set of elements (represented by vertices) connected by the links known as edges. A graph is different from tree in the sense that a graph can have cycle while the tree can not have the one. 25
  • 26. Operations on data structure  Searching: The process of finding the location of an element within the data structure is called Searching. There are two algorithms to perform searching, Linear Search and Binary Search. We will discuss each one of them later . 26
  • 27. Operations on data structure  Insertion: Insertion can be defined as the process of adding the elements to the data structure at any location.  Deletion: The process of removing an element from the data structure is called Deletion. We can delete an element from the data structure at any random location. 27
  • 28. Operations on data structure  Searching: The process of finding the location of an element within the data structure is called Searching. There are two algorithms to perform searching, Linear Search and Binary Search. We will discuss each one of them later . 28
  • 29. Operations on data structure  Traversing: Every data structure contains the set of data elements. Traversing the data structure means visiting each element of the data structure in order to perform some specific operation like searching or sorting. 29
  • 30. Operations on data structure  Sorting: The process of arranging the data structure in a specific order is known as Sorting. There are many algorithms that can be used to perform sorting, for example, insertion sort, selection sort, bubble sort, etc.  Merging: When two lists List A and List B of size M and N respectively, of similar type of elements, clubbed or joined to produce the third list, List C of size (M+N), then this process is called merging 30