You are given a 10-digit number: 3388766112. In each move, you can select a contiguous group of digits and increase/decrease them all by the same integer, provided that each resulting digit stays between 0 and 9 inclusive. For example, you can select the group 8766 and decrease them all by 3, resulting in 3385433112. What is the least number of moves required to bring every digit to 0? Good luck!
add two auxiliary 0s: 033887661120. Observe that there are 7 places where the digit changes and that each move can remove no more than two of those. Therefore at least 4 steps are required.
It can be done in 4. For example, 3388766112 -> 3333211112 -> 3333222222 -> 22222222222 -> 0000000000.