SlideShare a Scribd company logo
Code Lab
Module 1:
Introduction to
Problem Solving
Opeoluwa Daniel Oyedeji
GDSC Lead, E.U.
Elizade University
What is problem
solving?
Problem-solving refers to a
systematic approach to analyzing the
problem, developing a solution
(algorithm), and implementing that
solution in code.
Divide and Conquer
Problem-Solving Approaches
When tackling coding problems,
there are two main approaches you
can take to break them down and
develop a solution.
1. Top-Down Approach
2. Bottom-Up Approach
Top-Down Approach
This approach starts with the big
picture and works its way down.
1. Understand the overall
problem and break it down
into smaller subproblems.
1. Solve each subproblem
independently, and then
combine the solutions to
form the final solution to
the larger problem.
Top-Down Approach:
Calculating Area
1. Identify the whole shape.
2. Divide it into simpler
shapes.
3. Calculate the area of
each simple shape.
4. Combine the areas to find
the total area.
Top-Down Approach:
Calculating Area
1. Identify the whole shape.
2. Divide it into simpler
shapes.
3. Calculate the area of
each simple shape.
4. Combine the areas to find
the total area.
Semicircle
Area
Rectangle
Area
Triangle
Area
Total Area
Chart 1
Bottom-Up Approach
This approach starts with the
building blocks and works its way
up.
1. Start with the most basic
operations needed to solve
the problem.
1. Combine these operations
into larger functions to
create the overall
solution.
Bottom-Up Approach:
Counting Vowels
1. Implement a function to
identify vowels.
1. Implement a function to
iterate through the list.
Vowels : (a, e, i, o, u)
List: (b, d, c, a, z, x, i, l, f)
Identify vowels
// Basic Operation
private static boolean isVowel(char x) {
char[] vowels = { 'a', 'e', 'i', 'o', 'u' };
for (int i = 0; i < vowels.length; i++)
if (vowels[i] == x)
return true;
return false;
}
Iterate through list
// Larger Function
private static int countVowels(char[] arr) {
int count = 0;
for (int i = 0; i < arr.length; i++)
if (isVowel(arr[i]))
count++;
return count;
}
Recap
Introduction to Problem Solving

More Related Content

Similar to Code Lab Module1 (GDSC Elizade University)

Problem Solving Aspects.pptx
Problem Solving Aspects.pptxProblem Solving Aspects.pptx
Problem Solving Aspects.pptx
nikitakolambe21
 
Unit2 problem solving
Unit2 problem solvingUnit2 problem solving
Unit2 problem solving
StephanieBeck26
 
Unit 2 Problem Solving
Unit 2 Problem SolvingUnit 2 Problem Solving
Unit 2 Problem Solving
StephanieBeck26
 
Unit 2 Problem Solving
Unit 2 Problem SolvingUnit 2 Problem Solving
Unit 2 Problem Solving
StephanieBeck26
 
problem characterstics.pptx
problem characterstics.pptxproblem characterstics.pptx
problem characterstics.pptx
PriyadharshiniG41
 
Mental Models2
Mental Models2Mental Models2
Mental Models2
Katrin Becker
 
1_Steps_in_Problem_Solving.ppt
1_Steps_in_Problem_Solving.ppt1_Steps_in_Problem_Solving.ppt
1_Steps_in_Problem_Solving.ppt
ChSreenivasuluReddy
 
Esemen Matematik Penyelesaian Masalah
Esemen Matematik Penyelesaian MasalahEsemen Matematik Penyelesaian Masalah
Esemen Matematik Penyelesaian Masalah
Syafiqah Mohamed Noor
 
Do you follow instructions
Do you follow instructionsDo you follow instructions
Do you follow instructions
Independant Teacher
 
Creative Problem Solving Skills For Staff
Creative Problem Solving Skills For StaffCreative Problem Solving Skills For Staff
Creative Problem Solving Skills For Staff
Paul Nguyen
 
BMME7.4 Eunit doc2
BMME7.4 Eunit doc2BMME7.4 Eunit doc2
BMME7.4 Eunit doc2
Sandra K. Taylor
 
001 Wholebrain Problem Solving Slides
001 Wholebrain Problem Solving Slides001 Wholebrain Problem Solving Slides
001 Wholebrain Problem Solving Slides
Alan Barker
 
Chapter-11.-Problem-solving-creativity_2.0 (1).ppt
Chapter-11.-Problem-solving-creativity_2.0 (1).pptChapter-11.-Problem-solving-creativity_2.0 (1).ppt
Chapter-11.-Problem-solving-creativity_2.0 (1).ppt
karengempesaw
 
PPS_Unit 1.pptx
PPS_Unit 1.pptxPPS_Unit 1.pptx
PPS_Unit 1.pptx
KundanBhatkar
 
mgt312 part1
mgt312 part1mgt312 part1
mgt312 part1
ssuser8e0ca0
 
problem solving presentation.pptx
problem solving presentation.pptxproblem solving presentation.pptx
problem solving presentation.pptx
StewartSheckler
 
Problem solving technique , strategies
Problem solving technique , strategiesProblem solving technique , strategies
Problem solving technique , strategies
Hussein Kareem
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
ALI RAZA
 
Unit a
Unit aUnit a
Unit a
IceJudge
 
Instructional Strategies: Indirect Instruction in your lessons
Instructional Strategies: Indirect Instruction in your lessonsInstructional Strategies: Indirect Instruction in your lessons
Instructional Strategies: Indirect Instruction in your lessons
Caryn Chang
 

Similar to Code Lab Module1 (GDSC Elizade University) (20)

Problem Solving Aspects.pptx
Problem Solving Aspects.pptxProblem Solving Aspects.pptx
Problem Solving Aspects.pptx
 
Unit2 problem solving
Unit2 problem solvingUnit2 problem solving
Unit2 problem solving
 
Unit 2 Problem Solving
Unit 2 Problem SolvingUnit 2 Problem Solving
Unit 2 Problem Solving
 
Unit 2 Problem Solving
Unit 2 Problem SolvingUnit 2 Problem Solving
Unit 2 Problem Solving
 
problem characterstics.pptx
problem characterstics.pptxproblem characterstics.pptx
problem characterstics.pptx
 
Mental Models2
Mental Models2Mental Models2
Mental Models2
 
1_Steps_in_Problem_Solving.ppt
1_Steps_in_Problem_Solving.ppt1_Steps_in_Problem_Solving.ppt
1_Steps_in_Problem_Solving.ppt
 
Esemen Matematik Penyelesaian Masalah
Esemen Matematik Penyelesaian MasalahEsemen Matematik Penyelesaian Masalah
Esemen Matematik Penyelesaian Masalah
 
Do you follow instructions
Do you follow instructionsDo you follow instructions
Do you follow instructions
 
Creative Problem Solving Skills For Staff
Creative Problem Solving Skills For StaffCreative Problem Solving Skills For Staff
Creative Problem Solving Skills For Staff
 
BMME7.4 Eunit doc2
BMME7.4 Eunit doc2BMME7.4 Eunit doc2
BMME7.4 Eunit doc2
 
001 Wholebrain Problem Solving Slides
001 Wholebrain Problem Solving Slides001 Wholebrain Problem Solving Slides
001 Wholebrain Problem Solving Slides
 
Chapter-11.-Problem-solving-creativity_2.0 (1).ppt
Chapter-11.-Problem-solving-creativity_2.0 (1).pptChapter-11.-Problem-solving-creativity_2.0 (1).ppt
Chapter-11.-Problem-solving-creativity_2.0 (1).ppt
 
PPS_Unit 1.pptx
PPS_Unit 1.pptxPPS_Unit 1.pptx
PPS_Unit 1.pptx
 
mgt312 part1
mgt312 part1mgt312 part1
mgt312 part1
 
problem solving presentation.pptx
problem solving presentation.pptxproblem solving presentation.pptx
problem solving presentation.pptx
 
Problem solving technique , strategies
Problem solving technique , strategiesProblem solving technique , strategies
Problem solving technique , strategies
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
 
Unit a
Unit aUnit a
Unit a
 
Instructional Strategies: Indirect Instruction in your lessons
Instructional Strategies: Indirect Instruction in your lessonsInstructional Strategies: Indirect Instruction in your lessons
Instructional Strategies: Indirect Instruction in your lessons
 

Recently uploaded

CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
blueshagoo1
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
OH TEIK BIN
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
Celine George
 

Recently uploaded (20)

CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
 

Code Lab Module1 (GDSC Elizade University)