Big-O Notation
n + 2 → O(n): keep what grows, drop the rest.
INSTRUCTION
MEMORY
CONSOLE
MEMORY — every variable is a labeled box
(empty — no variables created yet)
CONSOLE — what the program says back
>▍ nothing printed yet
n + 2 → O(n): keep what grows, drop the rest.
MEMORY — every variable is a labeled box
CONSOLE — what the program says back