Counting Euclid's Steps — Solution & Editorial
Simulate the algorithm literally and count iterations — Fibonacci pairs maximize the count (≈ 87 steps at this limit).
Complexity: O(log min(A, B))
Simulate the algorithm literally and count iterations — Fibonacci pairs maximize the count (≈ 87 steps at this limit).
Complexity: O(log min(A, B))