← Back to Games

āš”ļø The Algorithm Speed Arena

Fight enemies representing different time complexities!

šŸŸļø 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!

āš™ļø Battle Controls
0
Total Attacks
0
Enemies Defeated
10
Current N
0
Damage Dealt
šŸ“ˆ Current Enemy Info

Complexity: O(1)

For N=10: 1 steps

Damage needed: 100

šŸŽ‰ VICTORY!

You defeated the O(1) Slime!

New enemy unlocked!