#3663

Find The Least Frequent Digit

pupil · 300 · lc easy +20 · 69.7% accepted · 45 likes · top 78%

Description

Given an integer n, identify the digit that appears least often in its decimal form. When multiple digits tie for the lowest frequency, pick the smallest among them. Return that digit as an integer.

Code

1
2
3