Time Complexity Visualizer
👇 Scroll down to learn how this algorithm works 👇
Complexity
O(1) - Constant
O(log n) - Logarithmic
O(n) - Linear
O(n²) - Quadratic
O(2ⁿ) - Exponential
Language
JavaScript
Python
Java
C++
C#
Go
Rust
TypeScript
Input Size (n):
10
Speed
▶ Play
⏸ Pause
⏩ Step
⟲ Reset
Steps:
0
/
-
Algorithm:
Direct access
array[index]
Algorithm Visualization
Code Execution
Time
vs
Input Size
Animation
What You're Learning
Step-by-Step Execution