Problem 991 · Medium

Broken Calculator

Turn a starting number into a target using only doubling and subtracting one, using as few steps as possible. The visual works backward from the target, halving or adding one at each step.

Open the interactive visualisation