Pergunta de entrevista da empresa Amazon

DP question Numbers With Repeated Digits