Your concept feed

11 ideas

A few small steps. No rush.

A small tour through the main ideas

Let’s picture it

Let’s start with three stops.

🏠 Home
🌳 Park
☕ Café

Home. Then the park. Then the café. Just a few things in a row.

Swipe when you’re ready
One little change

Point to the middle one.

0 · Home
1 · Park
2 · Café

The park is second. In Python, its position is 1, because counting starts at 0.

Same idea. One more small step.
Now it has a name

That’s a list.

Home
Park
Café

A list keeps things in order. An index is just a position in that list.

Want to try a tiny question?
No pressure. Just try it.

Which place is at position 0?

You can also keep scrolling
1 / 4
Start small

One small step at a time.

Nothing to learn first. Let’s replay this little example.

Let’s start with three stops.

🏠 Home
🌳 Park
☕ Café

Home. Then the park. Then the café. Just a few things in a row.

1 / 3
Let’s picture it

Same door. One small difference.

You + key
Locked door

You have a key. Your friend doesn’t. The door is the same, but your next move isn’t.

Swipe when you’re ready
One little change

Remember the key.

at door
has key?

If we only write down “at the door,” we lose something important.

Same idea. One more small step.
Now it has a name

That little note is a state.

place
key: yes

A state remembers what we need to continue. Here: where we are, and whether we have the key.

Want to try a tiny question?
No pressure. Just try it.

Is “at the door” enough to decide if we can enter?

You can also keep scrolling
1 / 4
The foundations

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

What if it rains?

☔ Rain
☕ Café

Let’s choose the café on rainy days, and the park on sunny days.

1 / 3
Let’s picture it

Open a box.

Big box
Small box
Empty

There’s a smaller box inside. We already know how to open a box.

Swipe when you’re ready
One little change

Do the same small job again.

Big box
Small box
Empty

Open the smaller box. Keep going until there isn’t another box inside.

Same idea. One more small step.
Now it has a name

That’s the idea of recursion.

smaller
smaller
stop

A function asks itself to handle a smaller case. The empty box is our stopping point: the base case.

Want to try a tiny question?
No pressure. Just try it.

What if every box contains another box forever?

You can also keep scrolling
1 / 4
Recursion

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

Same door. One small difference.

You + key
Locked door

You have a key. Your friend doesn’t. The door is the same, but your next move isn’t.

1 / 3
Let’s picture it

Try every pair first.

1
2
4
7

In a sorted row [1,2,4,7], seek a pair totaling 9. Checking every pair repeats work.

Swipe when you’re ready
One little change

Look at both ends.

1 ↑
7 ↑
sum 8

1 + 7 is too small. Moving the right pointer left only makes the sum smaller, so move the left pointer right.

Same idea. One more small step.
Now it has a name

Discard with a reason.

too small → left
too large → right
equal ✓

Now 2 + 7 = 9. Each move removes an entire family of impossible pairs, so both pointers move only forward overall.

Want to try a tiny question?
No pressure. Just try it.

When the sum is too small, which pointer can safely move?

You can also keep scrolling
1 / 4
Arrays, search & sorting

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

Let’s start with three stops.

🏠 Home
🌳 Park
☕ Café

Home. Then the park. Then the café. Just a few things in a row.

1 / 3
Let’s picture it

Count a tiny family of dots.

Parent
Child: 1
Child: 1

One parent has two children. Each child says, “There’s one of me.”

Swipe when you’re ready
One little change

Let the answers travel up.

Total: 3
1
1

The parent adds the two answers, then counts itself: 1 + 1 + 1.

Same idea. One more small step.
Now it has a name

That works for bigger trees too.

my answer
left answer
right answer

Ask each child about its little tree. Combine the answers. You don’t need to hold the whole tree in your head.

Want to try a tiny question?
No pressure. Just try it.

Do we also count the parent itself?

You can also keep scrolling
1 / 4
Trees

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

Open a box.

Big box
Small box
Empty

There’s a smaller box inside. We already know how to open a box.

1 / 3
Let’s picture it

Come back to our little map.

Home
Park
Café

Home, park, café. Each place is a dot; each allowed walk is a link.

Swipe when you’re ready
One little change

A dot can also mean a situation.

Park + key
Park, no key

“At park with a key” may allow a move that “at park without a key” cannot.

Same idea. One more small step.
Now it has a name

Choose dots that tell the whole story.

situation
legal move
new situation

A graph organizes possible moves. Sometimes places are enough. Sometimes a place plus a small extra fact is needed.

Want to try a tiny question?
No pressure. Just try it.

Must graph nodes always represent physical places?

You can also keep scrolling
1 / 4
Graphs

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

Same door. One small difference.

You + key
Locked door

You have a key. Your friend doesn’t. The door is the same, but your next move isn’t.

1 / 3
Let’s picture it

Try a snack combination.

Apple
Banana
Pear

Pick apple first. See what can go with it. We’re exploring, not committing forever.

Swipe when you’re ready
One little change

Put it back and try again.

Apple
Banana
Pear

After exploring the apple choices, undo that pick. Now start with banana.

Same idea. One more small step.
Now it has a name

That’s backtracking.

choose
explore
undo

Choose, explore, undo. Undoing keeps the next attempt from accidentally inheriting the last attempt’s choices.

Want to try a tiny question?
No pressure. Just try it.

Before a sibling attempt, what happens to path-only choices?

You can also keep scrolling
1 / 4
Backtracking

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

A question can make two more.

ways(4)
ways(3)
ways(2)

Climb one or two stairs at a time. Four stairs can lead to a smaller question with three or two left.

1 / 3
Let’s picture it

Car and cat start the same way.

c
a
r / t

Write c, then a, just once. Split where the words become different.

Swipe when you’re ready
One little change

A prefix isn’t always a word.

c
a
r
t ✓

If we only stored cart, reaching c-a-r is not enough to say car was stored too.

Same idea. One more small step.
Now it has a name

Mark where each word ends.

car ✓
cart ✓
cat ✓

This shared-prefix tree is a trie. The word-end mark tells a whole word apart from just its beginning.

Want to try a tiny question?
No pressure. Just try it.

Only cart is stored. Does car count as a stored word?

You can also keep scrolling
1 / 4
Tries

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

Count a tiny family of dots.

Parent
Child: 1
Child: 1

One parent has two children. Each child says, “There’s one of me.”

1 / 3
Let’s picture it

We’ve answered this before.

route A
3 stairs left
route B

Two routes leave us with three stairs left. We may climb one or two at a time.

Swipe when you’re ready
One little change

Save these three little routes.

1+1+1
1+2
2+1

The routes are 1+1+1, 1+2, and 2+1. Count them once; both arrivals can reuse the answer.

Same idea. One more small step.
Now it has a name

That sharing is the heart of DP.

same question
reuse answer

Dynamic programming saves answers to smaller questions. Share only when the remaining question really is the same.

Want to try a tiny question?
No pressure. Just try it.

One route has a key left and the other doesn’t. Always the same remaining question?

You can also keep scrolling
1 / 4
Thinking in DP

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

Same door. One small difference.

You + key
Locked door

You have a key. Your friend doesn’t. The door is the same, but your next move isn’t.

1 / 3
Let’s picture it

Take the biggest snack first?

4
5
4

Values are 4, 5, 4, and neighbors cannot both be taken. The biggest is 5.

Swipe when you’re ready
One little change

But the two 4s make 8.

4 ✓
5 ×
4 ✓

The tempting first choice blocked a better total. Looking best now wasn’t enough.

Same idea. One more small step.
Now it has a name

Try to break a greedy rule.

best now?
best overall?

Greedy means committing to a local choice. Before trusting it, ask what that choice might block later.

Want to try a tiny question?
No pressure. Just try it.

Does one failing example disprove “always take the biggest” here?

You can also keep scrolling
1 / 4
Greedy choices

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

Find 8 in a sorted row.

2
4
6
8
10

Start with 2, 4, 6, 8, 10. Look at the middle: 6.

1 / 3
Let’s picture it

You don’t have to guess the name.

remember?
next moves?

Start smaller: what do I need to remember, and what can I do next?

Swipe when you’re ready
One little change

Then look for one useful clue.

layers
saved answers
safe choices

Equal-cost moves suggest BFS. Repeated remaining questions suggest DP. A safe local choice suggests greedy.

Same idea. One more small step.
Now it has a name

Check the clue before choosing.

small example
reason
name

Change one rule and ask if the explanation still works. An algorithm’s name comes after the reason, not before it.

Want to try a tiny question?
No pressure. Just try it.

Should a familiar keyword replace checking the problem’s rules?

You can also keep scrolling
1 / 4
Connecting it all

One small step at a time.

This idea builds on these smaller ones. Pick any to revisit it here.

Do we still need yesterday’s notes?

older rows
yesterday
today

Suppose today’s row only reads yesterday’s row. Rows before yesterday will never be used again.

1 / 3
You've reached the end of these ideas.Try them without the labels