Next recursive call , also set nonz to 1 if current digit is non zero
ans += count ( pos + 1 , currCnt , currTight , nonz || ( dig != 0 ? 1 : 0 ) , num ) ; } return dp [ pos ] [ cnt ] [ tight ] [ nonz ] = ans ; }