← Back to Games

🏰 Divide & Conquer Castle

Watch the map size halve each step - experience O(log N)!

πŸ—ΊοΈ Castle Map - Divide to Conquer
64
Original Size (N)
64
Current Size
0
Steps Taken
6
logβ‚‚(N)
βš”οΈ Mini-Bosses Guarding Each Division
βš™οΈ Controls
πŸ“œ Division Log
🏰 Welcome to the Divide & Conquer Castle!
πŸ“ The Math Behind O(log N)
N = 64 β†’ logβ‚‚(64) = 6 steps
Each division halves the problem: 64 β†’ 32 β†’ 16 β†’ 8 β†’ 4 β†’ 2 β†’ 1

πŸ“š Why O(log N) is So Powerful

Logarithmic complexity occurs when we can eliminate half the problem with each step.

Incredible scaling: Even with 1 billion elements, logβ‚‚(1,000,000,000) β‰ˆ 30 steps!

N O(N) steps O(log N) steps
1,000 1,000 10
1,000,000 1,000,000 20
1,000,000,000 1,000,000,000 30