SlideShare a Scribd company logo
1 of 27
Algorithm and Data Structures
as the basic of IT Problem Solving
Christian A – Mei 2014
Training Material
• Information Technology Overview
– Theoretical
– Engineering
– Management
• Programming Principles
• Algorithm
• Data Structures
• Programming Concepts
Topics
• Discrete Mathematics
– Number Theory
– Set Theory, Relation, Function
– Combinatorics, Probability
– Graph
– Logic, Proof Theory
• Formal Foundation:
– Automata
– Turing Machine (model of computation: 1970 – now)
• Computer Architecture
– Von Neumann Architecture:
stored program architecture
• Computer Science (birth of : 1937-1970)
– Theory of Computation
– Branches:
• Automata Theory
• Computability Theory
• Computational Complexity Theory
Information Technology - Theoretical
• Programming
• Software Engineering:
– Requirement, Analysis, Design, Implementation
• Database
• Computer Networks
• Computer Security
Information Technology - Engineering
• Project Management
• Enterprise IT Architecture
• IT Governance
• IT Strategic Planning
• R
Information Technology - Management
“Algorithm + Data Structures = Program”
– Nicklaus Wirth (Father of Computer Science),
Creator of Pascal Language
“Program Cost: Time vs Space”
CPU Time vs Memory
“Program: Input – Process - Output”
Programming Principles
• Dynamic aspect of a program
• Sequence of steps to solve a problem
– Have a problem definition
– Have specific input
– Operate on specific data
structure (problem model)
– Produces output
• Popular algorithm maybe named for
easy communication
• Example:
• Problem: sorting
– Input: array
– Data structure: array
– Output: array
– Algorithm: Bubble Sort, Quick
Sort, Merge Sort, etc
Algorithm and Data Structure
• Static aspect of a program
• Representation of a problem (model)
• The structure / shape of the data (to
be processed)
• Is subject to be processed by an
algorithm
• Common data structures is named
• Example:
• Array
• List
• Map
• Stack
• Queue
• Matrix
• Graph
• etc
ALGORITHM DATA STRUCTURE
Algorithm and Data Structure - Example
• Problem: Find shortest path between a
source vertex and destination vertex
• Input:
– Source vertex
– Destination vertex
– Weighted graph
• Output:
– Shortest Path
• Algorithm: Dijkstra Algorithm
• Pseudocode: a pseudo programming language to describe algorithm that
will be understandable by a human reader, facilitates communication
• Programming: activity that translates the algorithm in the mind of the
programmer into specific Computer Language
• Program Source Code: for Computer or Human ?
• Human:
– Readibility
– Understandibility
– Clarity
– Structure
– Focus on the semantic (meaning)
• Computer:
– Executes binary instructions (bits)
– Source code is translated into binary instructions (machine language)
– Translation: Focus on the syntactic (what is written)
Pseudocode
• Variable
• Data Type
• Operators
• Control Structures
• Subprogram
• Abstract Data Type
Programming Concepts - Basic
• A location in memory to store a value
while a program is in execution
• Variable has:
– Name (label)
– Type (allowed values)
– Value
• Operation:
– Declaration
– Initialization
– Assignment (Write)
– Read
Variable
• Classify/restrict possible values that can be given to a data (domain values)
• Have a specific operations
• Have a name
• Primitive/Basic Data Types:
– Numeric:
• Integer: byte, short, int, long
• Real/Float: float, double
– Boolean
– Character
• Composite Data Type
– Derived from multiple primitive data types
– Combines into data structures
– Example:
• String
• Collection: Array of T, List of T, Map of <T1,T2>, Set of T
• Struct / Record { T1 f1, T2 f2, …}
• Class
Data Type
• Specific operations on a data type
• Arithmetic : Numeric, Numeric -> Numeric
• Ex: addition, subtraction, multiplication, division, modulo
• Relational: Numeric, Numeric -> Boolean
• Ex: less than, less than or equal, greater than, greater than or equal, equal,
not equal
• Logic : Boolean, Boolean -> Boolean
• Ex: not, and, or
• String operations:
• Ex: concat, substring, index of, length, …
Operators
• Literal
– Written text that represents a value that have a type
– Integer literal: 1, 1000, -1
– Float literal: 1.001, -0.2, -2E-03
– Boolean literal: true, false
– String literal: “hello”, “Jakarta”, “”
• Expression
– Combination of values that evaluates to a value
– 2+3
– sin(pi)
– x
– x+3
• Statement
– A single program action
• Block
– Combination of several statement considered as a single statement (block statement)
• Recursion
– A subprogram activity that calls itself
Programming Concepts
• Mechanism to controls the flow of the program
• Sequence
• Conditional
• Loop
Control Structures
• Basic sequential actions flow
statement 1;
statement 2;
statement 3;
…
Control Structures - Sequence
• Conditional / choice / selection of actions based on a boolean condition
IF
If condition then
statement;
IF-ELSE
if condition then
statement 1;
else
statement 2;
Control Structures - Conditional
• if-else-if-else …. visually forms a decision tree
• Make sure all possibilities have been covered !
Control Structures – Decision Tree
• Conditional loop
– while-do
– do-while / repeat-until
• Iteration
– Using a counter variable
– Over a collection (foreach)
• Loop control statement:
– Break statement
– Continue statement
Control Structures – Loop
• while-do
– Checks condition at top
– Loop Statement may /may not execute
• do-while
– Checks condition at bottom
– Loop Statement executed at least once
Control Structures – Conditional Loop
• for: index style
– Using integer index for loop condition
– While-do in compact form
• for-collection iteration
– Iterates over each element in collection
– No need for index
Control Structures – Iteration
• Break
– Used to exit loop immediately
– Application: searching
• Continue
– Used to skip next process and proceed
to next iteration
– Application: filtering
Control Structures – Loop - Break/Continue
• A program may divided into subprograms, or use existing subprograms
• Each subprogram perform specific tasks
• A program /sub program may call another sub program
– A call to a subprogram may pass data to that subprogram (parameter, argument)
– A call to a subprogram may return an output
• Main Program: program that initiates the main flow of control
• Subprogram types:
– Procedure: performs tasks, do not return an output
– Function: perform tasks and returns an output
• Parameter/argument types:
– Formal parameter: parameter that’s declared for the subprogram
– Actual parameter: actual value that’s passed to the subprogram
• Signature:
– Combination of input parameter types and output/return types
• double sin(double x) : double -> double
• int add(int x, int y) : int, int -> int
• void hello () : () -> void
Subprogram
Data Structures
Engineering Structures
Data Structures
Structure:
• Something arranged in a definite
pattern of organization
• Organization of parts as dominated by
the general character of the whole
• Compound Data type that contains multiple data each with the same type
• Array of T:
– Fixed size/length at allocation
– Static: May not grow
– Access: by index (direct access)
• List of T:
– Zero size at allocation
– Dynamic: may grow (add, remove)
– Access: by index (involves loop)
• Map of <T1,T2>:
– Map from an KEY type to VALUE type
– Example: to associate a Student with his Student Number
– Dynamic/may grow: put, remove
– Access: by key (direct access)
• Set of T:
– Dynamic collection of elements from type T
– Order is not guaranteed
– Each element must be unique in the set
Data Structures - Collection
• Data structures that represents an abstract concept
– Provide abstraction to a concept
– Provide encapsulation (hide internal implementation details)
– Provide specific operations
• Example:
– Stack: a concept that can be “created” from a array or list (the internal
implementation)
– Stack operations:
• void push (Stack s, T elem)
• T pop (Stack s)
• boolean isEmpty(Stack s)
• T getTop(Stack s)
Data Structures – Abstract Data Type
Tanya Jawab
Christian A
Email: coolpie at gmail.com
Q & A

More Related Content

What's hot

Lecture 1 objective and course plan
Lecture 1   objective and course planLecture 1   objective and course plan
Lecture 1 objective and course planjayavignesh86
 
Lecture01 algorithm analysis
Lecture01 algorithm analysisLecture01 algorithm analysis
Lecture01 algorithm analysisZara Nawaz
 
Algorithmic problem solving
Algorithmic problem solvingAlgorithmic problem solving
Algorithmic problem solvingPrabhakaran V M
 
Algorithm & data structures lec1
Algorithm & data structures lec1Algorithm & data structures lec1
Algorithm & data structures lec1Abdul Khan
 
Aad introduction
Aad introductionAad introduction
Aad introductionMr SMAK
 
Algorithm - Introduction
Algorithm - IntroductionAlgorithm - Introduction
Algorithm - IntroductionMadhu Bala
 
Algorithm analysis (All in one)
Algorithm analysis (All in one)Algorithm analysis (All in one)
Algorithm analysis (All in one)jehan1987
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithmrajkumar1631010038
 
01 Analysis of Algorithms: Introduction
01 Analysis of Algorithms: Introduction01 Analysis of Algorithms: Introduction
01 Analysis of Algorithms: IntroductionAndres Mendez-Vazquez
 
Algorithm Design Presentation
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design PresentationKawsar Ahmed
 
Daa presentation 97
Daa presentation 97Daa presentation 97
Daa presentation 97Garima Verma
 
Fundamentals of algorithms
Fundamentals of algorithmsFundamentals of algorithms
Fundamentals of algorithmsAmit Kumar Rathi
 
Algorithm analysis and efficiency
Algorithm analysis and efficiencyAlgorithm analysis and efficiency
Algorithm analysis and efficiencyppts123456
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventionssaranyatdr
 

What's hot (20)

Lecture 1 objective and course plan
Lecture 1   objective and course planLecture 1   objective and course plan
Lecture 1 objective and course plan
 
Lecture01 algorithm analysis
Lecture01 algorithm analysisLecture01 algorithm analysis
Lecture01 algorithm analysis
 
Data Structures & Algorithms
Data Structures & AlgorithmsData Structures & Algorithms
Data Structures & Algorithms
 
#1 designandanalysis of algo
#1 designandanalysis of algo#1 designandanalysis of algo
#1 designandanalysis of algo
 
Algorithmic problem solving
Algorithmic problem solvingAlgorithmic problem solving
Algorithmic problem solving
 
Algorithm & data structures lec1
Algorithm & data structures lec1Algorithm & data structures lec1
Algorithm & data structures lec1
 
Aad introduction
Aad introductionAad introduction
Aad introduction
 
Algorithm - Introduction
Algorithm - IntroductionAlgorithm - Introduction
Algorithm - Introduction
 
Algorithm analysis (All in one)
Algorithm analysis (All in one)Algorithm analysis (All in one)
Algorithm analysis (All in one)
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
01 Analysis of Algorithms: Introduction
01 Analysis of Algorithms: Introduction01 Analysis of Algorithms: Introduction
01 Analysis of Algorithms: Introduction
 
Algorithm Design Presentation
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design Presentation
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
 
ADA complete notes
ADA complete notesADA complete notes
ADA complete notes
 
Daa presentation 97
Daa presentation 97Daa presentation 97
Daa presentation 97
 
Fundamentals of algorithms
Fundamentals of algorithmsFundamentals of algorithms
Fundamentals of algorithms
 
Algorithm analysis and efficiency
Algorithm analysis and efficiencyAlgorithm analysis and efficiency
Algorithm analysis and efficiency
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventions
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
 
Algorithm Introduction
Algorithm IntroductionAlgorithm Introduction
Algorithm Introduction
 

Viewers also liked

2. basic data structures(1)
2. basic data structures(1)2. basic data structures(1)
2. basic data structures(1)Hongjun Jang
 
Unit2 algorithmic problem_solving
Unit2 algorithmic problem_solvingUnit2 algorithmic problem_solving
Unit2 algorithmic problem_solvingCapuchino HuiNing
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic AlgorithmsAhmed Othman
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codeshermiraguilar
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1luhkahreth
 
Intro to-iterative-deepening
Intro to-iterative-deepeningIntro to-iterative-deepening
Intro to-iterative-deepeningAdel Totott
 
Algorithm Designs - Control Structures
Algorithm Designs - Control StructuresAlgorithm Designs - Control Structures
Algorithm Designs - Control Structureshatredai
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
Mobile-First SEO - The Marketers Edition #3XEDigital
Mobile-First SEO - The Marketers Edition #3XEDigitalMobile-First SEO - The Marketers Edition #3XEDigital
Mobile-First SEO - The Marketers Edition #3XEDigitalAleyda Solís
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

Viewers also liked (11)

2. basic data structures(1)
2. basic data structures(1)2. basic data structures(1)
2. basic data structures(1)
 
Unit2 algorithmic problem_solving
Unit2 algorithmic problem_solvingUnit2 algorithmic problem_solving
Unit2 algorithmic problem_solving
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
 
Iterative deepening search
Iterative deepening searchIterative deepening search
Iterative deepening search
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Intro to-iterative-deepening
Intro to-iterative-deepeningIntro to-iterative-deepening
Intro to-iterative-deepening
 
Algorithm Designs - Control Structures
Algorithm Designs - Control StructuresAlgorithm Designs - Control Structures
Algorithm Designs - Control Structures
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Mobile-First SEO - The Marketers Edition #3XEDigital
Mobile-First SEO - The Marketers Edition #3XEDigitalMobile-First SEO - The Marketers Edition #3XEDigital
Mobile-First SEO - The Marketers Edition #3XEDigital
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar to Algorithm and Data Structures - Basic of IT Problem Solving

ds 1 Introduction to Data Structures.ppt
ds 1 Introduction to Data Structures.pptds 1 Introduction to Data Structures.ppt
ds 1 Introduction to Data Structures.pptAlliVinay1
 
1.1 introduction to Data Structures.ppt
1.1 introduction to Data Structures.ppt1.1 introduction to Data Structures.ppt
1.1 introduction to Data Structures.pptAshok280385
 
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...DrkhanchanaR
 
Advanced Data Analytics with R Programming.ppt
Advanced Data Analytics with R Programming.pptAdvanced Data Analytics with R Programming.ppt
Advanced Data Analytics with R Programming.pptAnshika865276
 
Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfDukeCalvin
 
Algorithms and Data Structures
Algorithms and Data StructuresAlgorithms and Data Structures
Algorithms and Data Structuressonykhan3
 
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using javaNarayan Sau
 
Algorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAlgorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAtner Yegorov
 
Algorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAlgorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisHiye Biniam
 
Introduction to DS.pptx
Introduction to DS.pptxIntroduction to DS.pptx
Introduction to DS.pptxOnkarModhave
 
DSJ_Unit I & II.pdf
DSJ_Unit I & II.pdfDSJ_Unit I & II.pdf
DSJ_Unit I & II.pdfArumugam90
 
How to obtain and install R.ppt
How to obtain and install R.pptHow to obtain and install R.ppt
How to obtain and install R.pptrajalakshmi5921
 
Introduction to Data Structures Sorting and searching
Introduction to Data Structures Sorting and searchingIntroduction to Data Structures Sorting and searching
Introduction to Data Structures Sorting and searchingMvenkatarao
 
Practical deep learning for computer vision
Practical deep learning for computer visionPractical deep learning for computer vision
Practical deep learning for computer visionEran Shlomo
 
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxII B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxsabithabanu83
 

Similar to Algorithm and Data Structures - Basic of IT Problem Solving (20)

ds 1 Introduction to Data Structures.ppt
ds 1 Introduction to Data Structures.pptds 1 Introduction to Data Structures.ppt
ds 1 Introduction to Data Structures.ppt
 
Intro_2.ppt
Intro_2.pptIntro_2.ppt
Intro_2.ppt
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
 
1.1 introduction to Data Structures.ppt
1.1 introduction to Data Structures.ppt1.1 introduction to Data Structures.ppt
1.1 introduction to Data Structures.ppt
 
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
 
Advanced Data Analytics with R Programming.ppt
Advanced Data Analytics with R Programming.pptAdvanced Data Analytics with R Programming.ppt
Advanced Data Analytics with R Programming.ppt
 
Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdf
 
Algorithms and Data Structures
Algorithms and Data StructuresAlgorithms and Data Structures
Algorithms and Data Structures
 
Lecture 1 (bce-7)
Lecture   1 (bce-7)Lecture   1 (bce-7)
Lecture 1 (bce-7)
 
Data structure Unit-I Part A
Data structure Unit-I Part AData structure Unit-I Part A
Data structure Unit-I Part A
 
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using java
 
Algorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAlgorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysis
 
Algorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAlgorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysis
 
Introduction to DS.pptx
Introduction to DS.pptxIntroduction to DS.pptx
Introduction to DS.pptx
 
DSJ_Unit I & II.pdf
DSJ_Unit I & II.pdfDSJ_Unit I & II.pdf
DSJ_Unit I & II.pdf
 
How to obtain and install R.ppt
How to obtain and install R.pptHow to obtain and install R.ppt
How to obtain and install R.ppt
 
Introduction to Data Structures Sorting and searching
Introduction to Data Structures Sorting and searchingIntroduction to Data Structures Sorting and searching
Introduction to Data Structures Sorting and searching
 
Practical deep learning for computer vision
Practical deep learning for computer visionPractical deep learning for computer vision
Practical deep learning for computer vision
 
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxII B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptx
 

Recently uploaded

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Algorithm and Data Structures - Basic of IT Problem Solving

  • 1. Algorithm and Data Structures as the basic of IT Problem Solving Christian A – Mei 2014 Training Material
  • 2. • Information Technology Overview – Theoretical – Engineering – Management • Programming Principles • Algorithm • Data Structures • Programming Concepts Topics
  • 3. • Discrete Mathematics – Number Theory – Set Theory, Relation, Function – Combinatorics, Probability – Graph – Logic, Proof Theory • Formal Foundation: – Automata – Turing Machine (model of computation: 1970 – now) • Computer Architecture – Von Neumann Architecture: stored program architecture • Computer Science (birth of : 1937-1970) – Theory of Computation – Branches: • Automata Theory • Computability Theory • Computational Complexity Theory Information Technology - Theoretical
  • 4. • Programming • Software Engineering: – Requirement, Analysis, Design, Implementation • Database • Computer Networks • Computer Security Information Technology - Engineering
  • 5. • Project Management • Enterprise IT Architecture • IT Governance • IT Strategic Planning • R Information Technology - Management
  • 6. “Algorithm + Data Structures = Program” – Nicklaus Wirth (Father of Computer Science), Creator of Pascal Language “Program Cost: Time vs Space” CPU Time vs Memory “Program: Input – Process - Output” Programming Principles
  • 7. • Dynamic aspect of a program • Sequence of steps to solve a problem – Have a problem definition – Have specific input – Operate on specific data structure (problem model) – Produces output • Popular algorithm maybe named for easy communication • Example: • Problem: sorting – Input: array – Data structure: array – Output: array – Algorithm: Bubble Sort, Quick Sort, Merge Sort, etc Algorithm and Data Structure • Static aspect of a program • Representation of a problem (model) • The structure / shape of the data (to be processed) • Is subject to be processed by an algorithm • Common data structures is named • Example: • Array • List • Map • Stack • Queue • Matrix • Graph • etc ALGORITHM DATA STRUCTURE
  • 8. Algorithm and Data Structure - Example • Problem: Find shortest path between a source vertex and destination vertex • Input: – Source vertex – Destination vertex – Weighted graph • Output: – Shortest Path • Algorithm: Dijkstra Algorithm
  • 9. • Pseudocode: a pseudo programming language to describe algorithm that will be understandable by a human reader, facilitates communication • Programming: activity that translates the algorithm in the mind of the programmer into specific Computer Language • Program Source Code: for Computer or Human ? • Human: – Readibility – Understandibility – Clarity – Structure – Focus on the semantic (meaning) • Computer: – Executes binary instructions (bits) – Source code is translated into binary instructions (machine language) – Translation: Focus on the syntactic (what is written) Pseudocode
  • 10. • Variable • Data Type • Operators • Control Structures • Subprogram • Abstract Data Type Programming Concepts - Basic
  • 11. • A location in memory to store a value while a program is in execution • Variable has: – Name (label) – Type (allowed values) – Value • Operation: – Declaration – Initialization – Assignment (Write) – Read Variable
  • 12. • Classify/restrict possible values that can be given to a data (domain values) • Have a specific operations • Have a name • Primitive/Basic Data Types: – Numeric: • Integer: byte, short, int, long • Real/Float: float, double – Boolean – Character • Composite Data Type – Derived from multiple primitive data types – Combines into data structures – Example: • String • Collection: Array of T, List of T, Map of <T1,T2>, Set of T • Struct / Record { T1 f1, T2 f2, …} • Class Data Type
  • 13. • Specific operations on a data type • Arithmetic : Numeric, Numeric -> Numeric • Ex: addition, subtraction, multiplication, division, modulo • Relational: Numeric, Numeric -> Boolean • Ex: less than, less than or equal, greater than, greater than or equal, equal, not equal • Logic : Boolean, Boolean -> Boolean • Ex: not, and, or • String operations: • Ex: concat, substring, index of, length, … Operators
  • 14. • Literal – Written text that represents a value that have a type – Integer literal: 1, 1000, -1 – Float literal: 1.001, -0.2, -2E-03 – Boolean literal: true, false – String literal: “hello”, “Jakarta”, “” • Expression – Combination of values that evaluates to a value – 2+3 – sin(pi) – x – x+3 • Statement – A single program action • Block – Combination of several statement considered as a single statement (block statement) • Recursion – A subprogram activity that calls itself Programming Concepts
  • 15. • Mechanism to controls the flow of the program • Sequence • Conditional • Loop Control Structures
  • 16. • Basic sequential actions flow statement 1; statement 2; statement 3; … Control Structures - Sequence
  • 17. • Conditional / choice / selection of actions based on a boolean condition IF If condition then statement; IF-ELSE if condition then statement 1; else statement 2; Control Structures - Conditional
  • 18. • if-else-if-else …. visually forms a decision tree • Make sure all possibilities have been covered ! Control Structures – Decision Tree
  • 19. • Conditional loop – while-do – do-while / repeat-until • Iteration – Using a counter variable – Over a collection (foreach) • Loop control statement: – Break statement – Continue statement Control Structures – Loop
  • 20. • while-do – Checks condition at top – Loop Statement may /may not execute • do-while – Checks condition at bottom – Loop Statement executed at least once Control Structures – Conditional Loop
  • 21. • for: index style – Using integer index for loop condition – While-do in compact form • for-collection iteration – Iterates over each element in collection – No need for index Control Structures – Iteration
  • 22. • Break – Used to exit loop immediately – Application: searching • Continue – Used to skip next process and proceed to next iteration – Application: filtering Control Structures – Loop - Break/Continue
  • 23. • A program may divided into subprograms, or use existing subprograms • Each subprogram perform specific tasks • A program /sub program may call another sub program – A call to a subprogram may pass data to that subprogram (parameter, argument) – A call to a subprogram may return an output • Main Program: program that initiates the main flow of control • Subprogram types: – Procedure: performs tasks, do not return an output – Function: perform tasks and returns an output • Parameter/argument types: – Formal parameter: parameter that’s declared for the subprogram – Actual parameter: actual value that’s passed to the subprogram • Signature: – Combination of input parameter types and output/return types • double sin(double x) : double -> double • int add(int x, int y) : int, int -> int • void hello () : () -> void Subprogram
  • 24. Data Structures Engineering Structures Data Structures Structure: • Something arranged in a definite pattern of organization • Organization of parts as dominated by the general character of the whole
  • 25. • Compound Data type that contains multiple data each with the same type • Array of T: – Fixed size/length at allocation – Static: May not grow – Access: by index (direct access) • List of T: – Zero size at allocation – Dynamic: may grow (add, remove) – Access: by index (involves loop) • Map of <T1,T2>: – Map from an KEY type to VALUE type – Example: to associate a Student with his Student Number – Dynamic/may grow: put, remove – Access: by key (direct access) • Set of T: – Dynamic collection of elements from type T – Order is not guaranteed – Each element must be unique in the set Data Structures - Collection
  • 26. • Data structures that represents an abstract concept – Provide abstraction to a concept – Provide encapsulation (hide internal implementation details) – Provide specific operations • Example: – Stack: a concept that can be “created” from a array or list (the internal implementation) – Stack operations: • void push (Stack s, T elem) • T pop (Stack s) • boolean isEmpty(Stack s) • T getTop(Stack s) Data Structures – Abstract Data Type
  • 27. Tanya Jawab Christian A Email: coolpie at gmail.com Q & A