Amazon interview question

DP question Numbers With Repeated Digits