Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Time complexity is a way to describe how the execution time of an algorithm grows as the size of the input (N) increases.
O(1)Constant Time. The operation always takes the same time regardless of input size.
O(log N)Logarithmic Time. The data is halved in each step (e.g., Binary Search).
O(N)Linear Time. The time grows proportionally with input size (e.g., Simple Loop).
O(N log N)Log-linear Time. Standard for efficient sorting (e.g., Merge Sort).
O(N²)Quadratic Time. Nested loops over the data.
An O(N²) algorithm might work for 1,000 items, but it could take YEARS to run for 1,000,000 items. Understanding Big O helps you choose the right algorithm for the scale of your data.