Tap here to switch tabs
Problem
Submissions

Problem: Find The Least Frequent Digit

Find The Least Frequent Digit asks you to examine a positive integer, return the digit appearing fewest times, and choose the smallest digit when frequencies are tied.

Statement

Given a positive integer n, find the least frequent digit present in n.

If multiple digits share the same minimum frequency, return the digit with the smallest value.

Constraints:

  • 1≤1 \leq n ≤231−1\leq 2^{31} - 1

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find The Least Frequent Digit

Find The Least Frequent Digit asks you to examine a positive integer, return the digit appearing fewest times, and choose the smallest digit when frequencies are tied.

Statement

Given a positive integer n, find the least frequent digit present in n.

If multiple digits share the same minimum frequency, return the digit with the smallest value.

Constraints:

  • 1≤1 \leq n ≤231−1\leq 2^{31} - 1