Unique Digits in Range

Problem Overview

  • Count how many integers in the inclusive range [a, b] have all unique digits.
  • Input: two integers a and b; Output: one integer representing the count.
  • Relevant to validating unique-digit IDs, PINs, or ticket numbers within a specified range.
  • A classic coding interview problem and interview question used to assess understanding of number properties and boundary handling.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: