<DS/>DS_VISUALIZER
FoundationsOOPArraysLinked ListStacksQueuesTreesGraphsHashingStrings
exploreExplore
homechevron_rightTopicschevron_rightFoundationschevron_rightTime Complexity
timer

FOUNDATIONS · COMPLEXITY

Time Complexity

Cost you can watch: every step drops a tile — see how the pile grows with n.

Choose a lesson

timerarrow_outward

Counting Steps

Speed isn't seconds — it's how steps grow with input.

≈ nO(1)◍ 0/6
functionsarrow_outward

Big-O Notation

n + 2 → O(n): keep what grows, drop the rest.

O(n)O(1)◍ 0/6
trending_uparrow_outward

Growth Rates

O(1) vs O(log n) vs O(n) vs O(n²) — a step-tile race.

O(1)→O(n²)—◍ 0/6