Problem 2998 · Medium

Minimum Number of Operations to Make X and Y Equal

Search outward from x with breadth-first steps (plus or minus one, divide by 5 or 11), so the first time y is reached is the fewest operations.

Open the interactive visualisation