seegongsik
Algorithms

How do you break a problem into steps

Earlier we said an algorithm is "a set order of steps for solving a problem." But faced with a big problem, that order just doesn't come to mind. The secret is simple: if it won't fit in one bite, break it into smaller pieces of the same kind.

01

It won't fit in one bite

Being told to clean your whole room feels overwhelming.
You can't think where to start, or in what order.
Big problems are like that: seen as one lump, they're too big to fit in one bite.

One lump, so it's daunting. Tap to break it
A big problem that won't go in one bite breaks into small pieces of the same shape.

Press the big problem and it breaks into small pieces. Clean the room → desk · bed · floor · bookshelf.

The whole room felt overwhelming, but split into desk, bed, floor, and bookshelf, it suddenly looks doable.
That's the first step in solving a big problem: break it into small pieces.

02

The same kind of problem, only smaller

Look closely at the pieces and you'll notice something interesting.
Each piece is still "cleaning." Cleaning the room has simply shrunk into cleaning the desk.
A piece is the same kind of problem as the original, only smaller.

Tap a piece to peek inside
See, inside is still the same-shaped "cleaning." Just smaller
A piece is the same shape as the original, only smaller. So you can solve it the same way.

Press a piece to look inside. Inside, too, it's the same kind of problem, only smaller. Cleaning the desk = cleaning.

This is useful because if you know how to solve the big problem, you can solve the small pieces the same way.
You don't need to learn a new method.
Since it's the same kind of problem, you just use the method you already have, on a smaller scale.

03

Put the pieces in order

Breaking it up isn't the end. The pieces have an order too.
If there's stuff all over the floor and you sweep the floor first, things falling from above will make a mess again.
The right order is to clear the desk and bed first and sweep the floor last.

Tap pieces in the order to handle them
After breaking, order matters. Sweep the floor last so it stays clean.

Press the pieces in the order you'd handle them. Doing the top (desk, bed, bookshelf) first and the floor last is correct.

With the order right, the pieces don't get in each other's way.
No more cleaning up after a mess an earlier piece made.
Just as we saw in Lesson 1, the same pieces in a different order give a different result.

04

Combine the pieces' answers

You've solved every piece: the desk, the bed, and the floor are all clean.
But wait, you only solved the pieces. Isn't the room still unfinished?
No. Once all the pieces are solved, together they make a clean room.

Tap a solved piece to combine it
Gathered (0/4)
When every piece answer is gathered, that is the answer to the big problem. Combining is a step too.

Press the solved pieces in turn and they combine into one. When all the pieces' answers are gathered, that's the answer to the big problem: a clean room.

So combining doesn't happen by itself.
Gathering the pieces' answers and joining them into one is a step in its own right.
Breaking it up, solving in order, and combining all have to work for the big problem to really be solved.

05

Summary: break, same kind, order, combine

When a big problem feels overwhelming, remember these four beats.
First, break it into smaller pieces of the same kind. Second, see that each piece is the same problem.
Third, set the right order. Fourth, combine the pieces' answers.
This is where computational thinking begins.

Tap the four beats in order
Break - same shape - order - combine. This is where computational thinking begins
Meet a big problem with these four beats. Break it small and any problem fits in your hand.

Press the four beats in turn to sum up the key ideas. Break → same kind → order → combine. One picture for handling a big problem.

Now you don't need to fear any big problem: if it won't fit in one bite, break it up.
But when there are many pieces, the order in which you do them really matters.
In the next lesson, we'll look at lining things up: sorting.

In one lineYou can't solve a big problem in one bite. So you break it into smaller problems of the same kind, decide what order to solve them in, and combine the pieces' answers again. Handling big problems by "break - order - combine" is where computational thinking begins, and any hard problem becomes manageable once you split it up.
← Algorithms
Was this helpful? Support seegongsik