Big O Notation Time Complexity
Worst-Case Time Complexity Best-Case Time Complexity
Average-Case Time Complexity O(1)
O(N) O(Log N)

 

The amount of time an algorithm takes to run as a function of the input size. A way of describing the space or time complexity of an algorithm.
The minimum amount of time an algorithm takes to run for a specific input of size n. The maximum amount of time an algorithm takes to run for any input of size n.
An operation whose execution time remains unchanged regardless of input size. The expected amount of time an algorithm takes to run for inputs of size n, considering all possible inputs.
A time or space complexity where the amount of time or memory used increases logarithmically with the size of the input. A time or space complexity where the amount of time or memory used increases linearly with the size of the input

 

O(N^2) Space Complexity
Best Case Average Case
Worst Case

 

The amount of memory or storage space required by an algorithm to solve a problem. A time or space complexity where the amount of time or memory used grows quadratically with the size of the input.
The expected amount of time or space resources required to solve a problem. The minimum amount of time or space resources required to solve a problem.
The maximum amount of resources (such as time or space) required to solve a problem, considering all possible inputs.