This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingReshape values into each other with the fewest gcd-sized steps.
What this asks
Use GCD structure to minimise the operations that reshape one value into another.
Work in gcd-sized steps: operations that preserve the gcd read off the ratio, everything else is discarded.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing