Compare how operation counts grow with input size.
Use Choosing algorithms for larger inputs
Compare operation counts as the input grows.
↔ Drag to explore
Learn more
The models count n visits, n² nested iterations, and floor(log₂n)+1 worst-case binary-search comparisons. Big-O is an upper bound, not elapsed seconds or a guarantee of speed on every input. Constants and implementation details still matter.
Space Complexity
Principles and uses
Compare extra memory needs as input grows.
Use Comparing copies, recursion and in-place work
Space complexity tracks memory growth; this example counts auxiliary space, excluding the input.
↔ Drag to explore
Learn more
Auxiliary space is separated from input storage. The diagram counts one element or variable per slot, not real byte sizes. Include copies and recursive call stacks, and state whether output storage is included.