If the current digit is 2 , any digit from [ 0 - 9 ] can be placed
elif ( digit == 2 ) : NEW_LINE INDENT for j in range ( 10 ) : NEW_LINE INDENT dp [ digit ] [ prev1 ] [ prev2 ] += countOfNumbers ( digit + 1 , j , prev1 , N ) NEW_LINE DEDENT DEDENT