Here we are counting the numbers starting with digit keypad [ i , j ] and of . Length k keypad [ i , j ] will become 1 st digit , and we need to look for ( k - 1 ) more digits
num = keypad [ i , j ] - '0' ; count [ num , k ] = 0 ;