Time Complexity
Definition: Time Complexity
The time complexity \(T(n)\) of an algorithm is the number of atomic operations that the algorithm performs before completion when given an input of length \(n\). We say that the algorithm runs in \(T(n)\) time.
Intuition
The time complexity \(T(n)\) is a function which depends on the input's length. An atomic operation is the most basic operation which the algorithm can perform and is assumed to always take a constant amount of time to run, which is why they serve as the units in which time complexity is measured.