SlideShare a Scribd company logo
Data Structures &
Algorithms
M H B Ariyaratne
https://goo.gl/LPZSV1
Program
A computer program is a sequence of instructions that will automate performing
a specific task or solve a given problem.
Good Programs
run correctly
run efficiently
be easy to read and understand
be easy to debug and
be easy to modify
Algorithms + Data Structures = Programs
Problems sorted with Data Structures
& Algorithms
● Real world data storage
○ Patient
■ Name
■ Date of Birth
■ Age
■ Weight
■ Height
■ Blood Pressure
● Programmers tools
○ Not Real World Data
○ For the use of the Program Itself
● Modeling
○ Graphs, Plane routs,
Data Structure
● An Arrangement of Date in a computer's memory
● A particular way of organizing data in a computer so that it can be used
efficiently
● A key organizing factor in software design
Algorithms
Manipulate data in data structures in various ways
● often associate with data structures.
● a sequence of instructions that accomplishes a task in a finite time period
● receives zero or more inputs
● produces at least one output
● consists of clear and unambiguous instructions
● terminates after a finite number of steps
Thank you

More Related Content

Similar to 2. data structures & algorithms

Chapter 1 - Prog101.ppt
Chapter 1 - Prog101.pptChapter 1 - Prog101.ppt
Chapter 1 - Prog101.ppt
JosephObadiahTuray
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
Ramiro Aduviri Velasco
 
C++ good tutorial
C++ good tutorialC++ good tutorial
C++ good tutorial
Ezzat Atalla
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF2
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
SADEED AMEEN
 
Machine learning and big data @ uber a tale of two systems
Machine learning and big data @ uber a tale of two systemsMachine learning and big data @ uber a tale of two systems
Machine learning and big data @ uber a tale of two systems
Zhenxiao Luo
 
Big data processing systems research
Big data processing systems researchBig data processing systems research
Big data processing systems research
Vasia Kalavri
 
COM1407: Structured Program Development
COM1407: Structured Program Development COM1407: Structured Program Development
COM1407: Structured Program Development
Hemantha Kulathilake
 
OutSystems Tips and Tricks
OutSystems Tips and TricksOutSystems Tips and Tricks
OutSystems Tips and Tricks
OutSystems
 
Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptx
TeddyDaka
 
Unified Operations Vision
Unified Operations VisionUnified Operations Vision
Unified Operations Vision
Steve Mushero
 
Object oriented programming 1 introduction to oop
Object oriented programming 1 introduction to oopObject oriented programming 1 introduction to oop
Object oriented programming 1 introduction to oop
Vaibhav Khanna
 
Webinar: Successful Data Migration to Microsoft Dynamics 365 CRM | InSync
Webinar: Successful Data Migration to Microsoft Dynamics 365 CRM | InSyncWebinar: Successful Data Migration to Microsoft Dynamics 365 CRM | InSync
Webinar: Successful Data Migration to Microsoft Dynamics 365 CRM | InSync
APPSeCONNECT
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
Alluxio, Inc.
 
Software Design Practices for Large-Scale Automation
Software Design Practices for Large-Scale AutomationSoftware Design Practices for Large-Scale Automation
Software Design Practices for Large-Scale Automation
Hao Xu
 
Scalable, good, cheap
Scalable, good, cheapScalable, good, cheap
Scalable, good, cheap
Marc Cluet
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor Management
Damian T. Gordon
 
Lecture 1 and 2
Lecture 1 and 2Lecture 1 and 2
Lecture 1 and 2
SaheedTundeZubairSTA
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
Fadilah Badari
 
peter_proramming_1 (Repaired)
peter_proramming_1 (Repaired)peter_proramming_1 (Repaired)
peter_proramming_1 (Repaired)
Brandon S
 

Similar to 2. data structures & algorithms (20)

Chapter 1 - Prog101.ppt
Chapter 1 - Prog101.pptChapter 1 - Prog101.ppt
Chapter 1 - Prog101.ppt
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
C++ good tutorial
C++ good tutorialC++ good tutorial
C++ good tutorial
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
Machine learning and big data @ uber a tale of two systems
Machine learning and big data @ uber a tale of two systemsMachine learning and big data @ uber a tale of two systems
Machine learning and big data @ uber a tale of two systems
 
Big data processing systems research
Big data processing systems researchBig data processing systems research
Big data processing systems research
 
COM1407: Structured Program Development
COM1407: Structured Program Development COM1407: Structured Program Development
COM1407: Structured Program Development
 
OutSystems Tips and Tricks
OutSystems Tips and TricksOutSystems Tips and Tricks
OutSystems Tips and Tricks
 
Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptx
 
Unified Operations Vision
Unified Operations VisionUnified Operations Vision
Unified Operations Vision
 
Object oriented programming 1 introduction to oop
Object oriented programming 1 introduction to oopObject oriented programming 1 introduction to oop
Object oriented programming 1 introduction to oop
 
Webinar: Successful Data Migration to Microsoft Dynamics 365 CRM | InSync
Webinar: Successful Data Migration to Microsoft Dynamics 365 CRM | InSyncWebinar: Successful Data Migration to Microsoft Dynamics 365 CRM | InSync
Webinar: Successful Data Migration to Microsoft Dynamics 365 CRM | InSync
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Software Design Practices for Large-Scale Automation
Software Design Practices for Large-Scale AutomationSoftware Design Practices for Large-Scale Automation
Software Design Practices for Large-Scale Automation
 
Scalable, good, cheap
Scalable, good, cheapScalable, good, cheap
Scalable, good, cheap
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor Management
 
Lecture 1 and 2
Lecture 1 and 2Lecture 1 and 2
Lecture 1 and 2
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
 
peter_proramming_1 (Repaired)
peter_proramming_1 (Repaired)peter_proramming_1 (Repaired)
peter_proramming_1 (Repaired)
 

More from M H Buddhika Ariyaratne

14. collections
14. collections14. collections
14. collections
M H Buddhika Ariyaratne
 
13. interfaces
13. interfaces13. interfaces
13. interfaces
M H Buddhika Ariyaratne
 
12. arrays
12. arrays12. arrays
11. java methods
11. java methods11. java methods
11. java methods
M H Buddhika Ariyaratne
 
10. inheritance
10. inheritance10. inheritance
10. inheritance
M H Buddhika Ariyaratne
 
9. strings
9. strings9. strings
8. objects & classes
8. objects & classes8. objects & classes
8. objects & classes
M H Buddhika Ariyaratne
 
7. flowcharts and pseudocode
7. flowcharts and pseudocode7. flowcharts and pseudocode
7. flowcharts and pseudocode
M H Buddhika Ariyaratne
 
6. java operators
6. java operators6. java operators
6. java operators
M H Buddhika Ariyaratne
 
5. variables & data types
5. variables & data types5. variables & data types
5. variables & data types
M H Buddhika Ariyaratne
 
4. mathematics for computing
4. mathematics for computing4. mathematics for computing
4. mathematics for computing
M H Buddhika Ariyaratne
 
3. introduction to java
3. introduction to java3. introduction to java
3. introduction to java
M H Buddhika Ariyaratne
 
1. introduction mathematics for computing and object oriented programming
1. introduction   mathematics for computing  and  object oriented programming1. introduction   mathematics for computing  and  object oriented programming
1. introduction mathematics for computing and object oriented programming
M H Buddhika Ariyaratne
 
Gis for healthcare introduction
Gis for healthcare   introductionGis for healthcare   introduction
Gis for healthcare introduction
M H Buddhika Ariyaratne
 
Open hospital management information system
Open hospital management information systemOpen hospital management information system
Open hospital management information system
M H Buddhika Ariyaratne
 
Who am i and what i have done
Who am i and what i have doneWho am i and what i have done
Who am i and what i have done
M H Buddhika Ariyaratne
 
Electronic health record system for sri lankan general practitioners
Electronic health record system for sri lankan general practitionersElectronic health record system for sri lankan general practitioners
Electronic health record system for sri lankan general practitioners
M H Buddhika Ariyaratne
 

More from M H Buddhika Ariyaratne (17)

14. collections
14. collections14. collections
14. collections
 
13. interfaces
13. interfaces13. interfaces
13. interfaces
 
12. arrays
12. arrays12. arrays
12. arrays
 
11. java methods
11. java methods11. java methods
11. java methods
 
10. inheritance
10. inheritance10. inheritance
10. inheritance
 
9. strings
9. strings9. strings
9. strings
 
8. objects & classes
8. objects & classes8. objects & classes
8. objects & classes
 
7. flowcharts and pseudocode
7. flowcharts and pseudocode7. flowcharts and pseudocode
7. flowcharts and pseudocode
 
6. java operators
6. java operators6. java operators
6. java operators
 
5. variables & data types
5. variables & data types5. variables & data types
5. variables & data types
 
4. mathematics for computing
4. mathematics for computing4. mathematics for computing
4. mathematics for computing
 
3. introduction to java
3. introduction to java3. introduction to java
3. introduction to java
 
1. introduction mathematics for computing and object oriented programming
1. introduction   mathematics for computing  and  object oriented programming1. introduction   mathematics for computing  and  object oriented programming
1. introduction mathematics for computing and object oriented programming
 
Gis for healthcare introduction
Gis for healthcare   introductionGis for healthcare   introduction
Gis for healthcare introduction
 
Open hospital management information system
Open hospital management information systemOpen hospital management information system
Open hospital management information system
 
Who am i and what i have done
Who am i and what i have doneWho am i and what i have done
Who am i and what i have done
 
Electronic health record system for sri lankan general practitioners
Electronic health record system for sri lankan general practitionersElectronic health record system for sri lankan general practitioners
Electronic health record system for sri lankan general practitioners
 

Recently uploaded

GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 

Recently uploaded (20)

GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 

2. data structures & algorithms

  • 1. Data Structures & Algorithms M H B Ariyaratne https://goo.gl/LPZSV1
  • 2. Program A computer program is a sequence of instructions that will automate performing a specific task or solve a given problem.
  • 3. Good Programs run correctly run efficiently be easy to read and understand be easy to debug and be easy to modify
  • 4. Algorithms + Data Structures = Programs
  • 5. Problems sorted with Data Structures & Algorithms ● Real world data storage ○ Patient ■ Name ■ Date of Birth ■ Age ■ Weight ■ Height ■ Blood Pressure ● Programmers tools ○ Not Real World Data ○ For the use of the Program Itself ● Modeling ○ Graphs, Plane routs,
  • 6. Data Structure ● An Arrangement of Date in a computer's memory ● A particular way of organizing data in a computer so that it can be used efficiently ● A key organizing factor in software design
  • 7. Algorithms Manipulate data in data structures in various ways ● often associate with data structures. ● a sequence of instructions that accomplishes a task in a finite time period ● receives zero or more inputs ● produces at least one output ● consists of clear and unambiguous instructions ● terminates after a finite number of steps

Editor's Notes

  1. The first of these is obvious - programs which don't run correctly are clearly of little use. "Efficiently" is usually understood to mean in the minimum time - but occasionally there will be other constraints, such as memory use, which will be paramount. As will be demonstrated later, better running times will generally be obtained from use of the most appropriate data structures and algorithms. Must be reliable and easy to maintain.