Help me out in this
When considering a number x, for each digit in the decimal representation of x, we can try to remove it. The transition is therefore: v[i]=min(v[i], v[i-(rem)]+1);
We initialize v[0] = 0.
The complexity is O(n).
here is your corrected code:
if this solves your doubt ,please mark it as resolved