Amazon - How Many X’s In a Range
Given two integers L, R, and digit X. Find the number of occurrences of X in all the numbers in the range (L, R) excluding L and R.
Example 1:
Input:
L=10, R=19, X=1
Output:
9
Explanation:
There are 9 1s (11, 12, 13, 14, 15, 16, 17, 18) in the number...
sirishachallagiri.hashnode.dev2 min read