Count 3 Sister Numbers
Learn this problemProblem statement
Note - See the problem source section below for the original prompt :)
2000 years ago, in the enchanted land of Numeria, the Numerian Council was tasked with counting a special group of three-digit numbers that lived between left and right, where 100 ≤ left ≤ right ≤ 999. These numbers were unique because each of their three digits was distinct—like three adventurous friends on a quest, none of them alike. The council had to ensure they found all such numbers where no two digits were the same, within the magical range of Numeria. The task did not require the swiftest method, but it needed a solution that wouldn't take longer than right² steps, making sure the story of these numbers could be told efficiently without too much trouble. And so, their journey to count these special heroes began, celebrating each distinct number as a unique part of their magical land.
Function
countThreeSisters(l: int, r: int) → intExamples
Example 1
l = 876r = 890return = 3Constraints
There might be more constraints. I will add them once find more reliable source :)More Meta problems
- Plan a Minimum-Cost Round TripONSITE INTERVIEW · Seen Jul 2026
- Merge Three Sorted ArraysPHONE SCREEN · Seen May 2026
- Highest Rating Price RatioOA · Seen Mar 2026
- Diagonal Traverse (for E4 ;)PHONE SCREEN · Seen Mar 2025
- Find Peak ElementPHONE SCREEN · Seen Mar 2025
- Find Pair Closest to K (for E5 :)PHONE SCREEN · Seen Feb 2025
- Get Minimum Round Trip Cost (: for E4 && E5 :)PHONE SCREEN · Seen Feb 2025
- Max Consecutive Ones III (for E5 :)PHONE SCREEN · Seen Feb 2025