šļø Battle Arena
ALGORITHM HERO
100 / 100 HP
VS
O(1) Slime
100 /
100 HP
āļø Welcome to the Algorithm Speed Arena!
š Enter N and attack to deal damage based on complexity!
š Complexity Comparison
š How Time Complexity Works
Each enemy has health based on their complexity growth rate. When you input N:
- O(1) - Constant: Always takes 1 step regardless of N
- O(log N) - Logarithmic: Steps grow slowly (e.g., binary search)
- O(N) - Linear: Steps equal N (e.g., simple loop)
- O(N log N) - Linearithmic: Steps grow moderately (e.g., merge sort)
- O(N²) - Quadratic: Steps grow fast (e.g., nested loops)
- O(2^N) - Exponential: Steps explode! (e.g., recursive subsets)
- O(N!) - Factorial: Maximum chaos! (e.g., permutations)
Your damage = base damage Ć (complexity steps for N). Higher complexity = more damage needed!