~/boss / brick-towers
Euclid's algorithm (GCD)
The Brick Towers
Find the biggest brick that measures both towers, in as few cuts as Euclid.
Loading the fight…
How to beat it
Lay the short tower along the tall one as many times as it fits. The leftover becomes the new short tower: gcd(a, b) = gcd(b, a mod b). When nothing is left over, the last tower standing is the answer.
Now the real boss
Interviews ask for the code. Watch it run, then write it yourself, tested in Python, C++ or Java.
On your phone? Writing code is easier on a laptop: open bossfight.dev/problems/primes-gcd-euclid-gcd there. Sign in with your email to keep your progress on every device.