Dynamic programming question doubt

count of no of occurences of a digit in between the given no from 1 to n;
https://leetcode.com/problems/number-of-digit-one/solution/.
and what if the question will be say count no of 2,or 4 or any random digit

Hey @Sumant123
Digit 1 occurred in 1 to N
if N=13
1,11,12,13
output : 6 ( count of 1)