Week 5 - Problem solving

Problem solving methods

Basic algorithms

Big O notation

Logging

Debugging

Unit testing

AI

Practice

Assignment

Core program

Problem solving methods

What is problem solving?

Problem solving is the process of understanding a challenge, breaking it into smaller pieces, and creating a step-by-step plan to solve it. Programming is not about memorizing syntax — it's about learning how to think clearly and logically.

You can think of problem solving like giving instructions to a robot: every step must be precise, ordered, and unambiguous.

// A simple problem:
// Given an array of numbers, return the largest one.

function findMax(numbers) {
  let max = numbers[0];

  for (const num of numbers) {
    if (num > max) {
      max = num;
    }
  }

  return max;
}

This solution didn’t come from magic — it came from breaking the problem down and solving one part at a time.

<aside>

💡 Insight : Good developers don’t start by writing code — they start by understanding the problem deeply.

</aside>


Why problem solving matters

Programming languages change. Tools change. Libraries change.

Why problem solving matters

You'll use problem-solving when:

This skill is the foundation of becoming a real developer.


Problem Solving

Problem solving is the foundation of programming. It’s not about typing code — it’s about thinking, understanding problems, breaking them down, and creating a clear plan that a computer can follow.

Problem solving method

Milestone 1: Ask questions & clarify the problem statement clearly.

Milestone 2: Finalize approach & execution plan

Milestone 3: Come up with an "Instruction Manual" for a 10 year old

Milestone 4: Code by expanding your 10 Year Old's "Instruction Manual"

Milestone 5: Prove that your code works using custom test cases

Summary Table

Milestone Goal Output
1. Understand the problem Clarify inputs/outputs Examples + edge cases
2. Finalize approach Choose best method Strategy explanation
3. Instruction Manual Write pseudocode Step-by-step plan
4. Code solution Convert plan to JS Working program
5. Test thoroughly Ensure correctness Custom test cases

Additional resources

🎥 Videos


The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0 **

CC BY-NC-SA 4.0 Icons

*https://hackyourfuture.net/*