๐Ÿ’ปap computer science a review

Time complexity

Written by the Fiveable Content Team โ€ข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโ€ขWritten by the Fiveable Content Team โ€ข Last updated September 2025

Definition

The time complexity of an algorithm refers to the amount of time it takes for the algorithm to run, based on the size of its input. It measures how the runtime increases as the input size increases.