Algorithm Efficiency Calculator
Algorithm Information
Time Complexity Analysis
Empirical Measurements (Optional)
Algorithm Comparison
Your Algorithm
O(?)
Comparison Algorithm
O(?)
Common Time Complexities
O(1)
Constant Time: Operations that always execute in the same time regardless of input size (e.g., array index access).
O(log n)
Logarithmic Time: Operations that divide the problem size in each step (e.g., binary search).
O(n)
Linear Time: Operations that scale linearly with input size (e.g., simple search through a list).
O(n log n)
Linearithmic Time: Common for efficient sorting algorithms (e.g., merge sort, quick sort).
O(n²)
Quadratic Time: Operations that require nested iterations (e.g., bubble sort, naive matrix multiplication).
O(2ⁿ)
Exponential Time: Operations that double with each addition to input (e.g., brute-force solutions).
O(n!)
Factorial Time: Extremely inefficient (e.g., traveling salesman brute-force solution).