Pregunta de entrevista de Amazon

DP question Numbers With Repeated Digits