FastPrepCount Three-Digit Numbers with Distinct Digits
Problems/Count Three-Digit Numbers with Distinct Digits

Count Three-Digit Numbers with Distinct Digits

ZipRecruiter logoZipRecruiter● EasyFULLTIMENEW GRADOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Two ZipRecruiter OA reports describe an inclusive three-digit range, digits that all differ, and the example from 876 through 890. One report has no employment label, so this record keeps both the clear new-grad evidence and the full-time default. We supplied a function signature.

You are given an inclusive range [left, right] containing only three-digit positive integers.

Return how many values in the range have three pairwise distinct decimal digits.

Function

countDistinctThreeDigitNumbers(left: int, right: int) → int

Examples

Example 1

left = 876right = 890return = 3

The qualifying values are 876, 879, and 890.

Example 2

left = 100right = 105return = 4

The qualifying values are 102, 103, 104, and 105.

Constraints

  • 100 <= left <= right <= 999

More ZipRecruiter Online Assessment questions

  • Four-Level Banking System with Scheduled PaymentsOA · Seen Oct 2026
  • Longest Frequency-Bounded SubarrayOA · Seen Oct 2024
  • Minimum Changes to Draw a YOA · Seen Oct 2024
  • Apply Binary State OperationsOA · Seen Sep 2024
  • Simulate Orchard Rot SpreadOA · Seen Sep 2024
  • Compare Odd- and Even-Index SumsOA · Seen Sep 2024
  • Coordinate Removals with Column GravityOA · Seen Sep 2024
  • Lexicographically Smallest End ReversalOA · Seen Sep 2024
  • Recursively Expanded Shell Command CountsOA · Seen Sep 2024
  • Count Case-Insensitive Key ChangesOA · Seen Sep 2024

Similar questions at other companies

  • Basic Item DiscountsPalantir · OAPalantir interview questions
  • Diagonal Bounce TraversalAutodesk · OAAutodesk interview questions
  • Costliest ChocolateRippling · OARippling interview questions
  • Distinct Chapters Missed During a Cyclic AbsenceVisa · OAVisa interview questions
  • Count Palindromic Base RepresentationsSEDEMAC · OA
  • Reduce a Number to One DigitAccenture · OAAccenture interview questions
  • Online No-Intercept Linear RegressionTwo Sigma · OATwo Sigma interview questions
  • Calculate the Half SpreadMillennium · OAMillennium interview questions
  • Plus Mult ArrayIBM · OAIBM interview questions
  • Product Minus Sum of DigitsTikTok · OATikTok interview questions

ZipRecruiter interview experiences

  • ZipRecruiter SWE OA, Level Not Reported: 23 Experiences
  • ZipRecruiter SWE Intern OA Scores: 4 Experiences
  • ZipRecruiter SWE New Grad OA: 9 Experiences
All ZipRecruiter interview questionsSee ZipRecruiter hiring insights
Saved
class Solution {
    public int countDistinctThreeDigitNumbers(int left, int right) {
        // Write your code here.
    }

}
Checking account…