Learning Rooms/△ Level 2 · Builder/Computing and algorithms
Intro to Algorithms: Crash Course Computer Science #13
CrashCourse · Length: see YouTube · captions on YouTube · nothing loads until you press play
By the end you can…
- Read and draw a flowchart with actions, a decision and a loop back.
- Trace a flowchart by hand with a trace table to predict how many times a loop runs.
- Explain why a loop's stopping test should use < or >= rather than an exact match.
Watch it all: no segment has been checked by hand for this video yet.
1.Predict before you press play
The tank starts at 20 L and each pump pass adds 15 L. The flowchart loops while level != 90. What happens?
Pick one before you press play. A wrong guess is fine: it is what makes the video stick.
2.See the idea first
Play with this diagram for a minute. It gives you something to hang the video on.
Loading the interactive…
Can't use the diagram? Read a description instead
The flowchart runner shows: Start (read level) → decision 'level < 90?' → if yes, pump one pass adding 15 L and return to the decision; if no, pump off and stop. A slider sets the starting level and a switch changes the decision to 'level != 90'. From 20 L the trace table reads 20, 35, 50, 65, 80, 95 (stop) with '<', but with '!=' the levels pass 90 and keep rising past the 120 L tank capacity.
3.Watch, actively
Shows how a step-by-step recipe of decisions and repeats lets a machine solve a problem such as sorting.
Length: see YouTube · captions on YouTube · source
Nothing loads from YouTube until you press play.
Watch for…
- → Watch for how an algorithm is a sequence of steps and decisions, the same thing a flowchart draws.
- → Watch for two ways of sorting the same list and how different their amount of work is.
- → Watch how a sorting algorithm repeats the same few steps with a decision each time: the same loop-and-decide shape as the tank flowchart.
- → Watch for how the cost of sorting is described and compared, and why the order of growth matters.
- → Notice how the video compares selection sort's n² with merge sort's n log n by counting comparisons, not by timing a particular computer.
Pause whenever you like. Rewatching a hard minute is a good habit, not a failure.
Can't stream it? Read the idea instead
An algorithm is a sequence of steps and decisions, which is exactly what a flowchart draws. Different sorting algorithms reach the same sorted list with very different amounts of work, and the difference grows quickly as the list gets longer.
What the video covers (our own note, written when we verified it): Shows how a step-by-step recipe of decisions and repeats lets a machine solve a problem such as sorting.
Written by Tactiverge in our own words, not a transcript. The full lessons below explain the idea without the video.
Jot down one thing that surprised you and one question you still have.
4.Practise what you just saw
These come from the lessons that use this video and are checked on the server. Wrong answers get a hint and another try.
Practice 1
Which flowchart shape holds a yes/no question?
Practice 2
How many counts does it take to count 36 people in groups of 3?
Practice 3
A loop runs while level != 100 and adds 30 L per pass, starting at 0 L. What happens?
Practice 4
You must repeatedly list every part number between 2000 and 2100. Which preparation is best?
5.Try it yourself
No simulation models this idea yet. The lessons below have an interactive diagram instead.
6.Build something with it
Follow-up project
Draw a flowchart for a phone charger that charges in 10 % steps while the battery is below 80 %, then stops. Trace it from 35 %. Then redraw it with an extra decision that stops charging if the battery is hotter than 45 °C.
Where this video lives
- Flowcharts: drawing a decision · Level 1, week 17
- Some algorithms are better than others · Level 1, week 20
- Flowcharts: drawing decisions and loops · Level 2, week 1
- Sort once, search many: when sorting pays · Level 3, week 5
- How fast does the work grow? · Level 5, week 19
In the course catalogue: CSE-101 Algorithms without code · CSE-210 Python for engineers · CSE-320 Algorithms and numerical computation · CSE-510 Numerical solvers and complexity
The video is by CrashCourse, embedded from YouTube with privacy-enhanced mode and never autoplayed. The room around it (prompts, notes, practice, projects) is Tactiverge's, written with AI assistance and checked by automated tests only.