Typorithm · easy
Time Complexity Intro
patternstime-complexitybig-o
Saved on this device
Full lesson · 2 learning steps Open any exercise for focused practice
10%
Step 1 of 2 · intro card
Learn Time Complexity
Basic Patterns
Time complexity describes how work grows as input size grows.
Big O focuses on growth, not exact milliseconds.
O(1) means the work stays constant. O(n) grows with each item.
O(n^2) often comes from nested loops. O(log n) often comes from repeatedly cutting the search space in half.
01
O(1): constant work.
02
O(n): one pass through input.
03
O(n^2): nested growth.
04
O(log n): repeatedly halve the search space.
// O(n)
for (const item of items) {
visit(item);
}A complete learning loop
01
Understand
Read the concept map and follow the code breakdown.
02
Reconstruct
Type the implementation, repair mistakes and work through every recall exercise.
03
Verify
Use the final check without hints; revisit weak concepts in short practice sessions.