ANCO

Big O Visualizer

Drag for loops and if statements into the workspace. Nest them inside each other to see how the time complexity changes. Click a block to select it, then use “Move to left-most” to un-nest it and see why two sequential O(N) loops are still O(N).

Current Time Complexity

O(1)

Blocks

for loop
if statement

Click a block to select it, then use “Move to left-most”

Drag blocks here to start