Minimum Rotations to Dial a Number I
Turn a circular dial of ten digits from zero to each digit in turn, taking the shorter direction every time and paying one step per digit crossed.
Turn a circular dial of ten digits from zero to each digit in turn, taking the shorter direction every time and paying one step per digit crossed.