New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Microsoft
Coding Question
AI Insights
Quick Summary
Given four digits, determine how many unique valid 24-hour times can be formed using each digit exactly once.
A valid time requires the first two digits to represent an hour between 00 and 23, and the last two to represent minutes between 00 and 59.
The fixed input size allows for exhaustive permutation checking with simple boundary validation.
What This Tests
Permutation generation and backtracking fundamentals
Constraint validation and boundary checking
Handling duplicate values and ensuring unique results
Algorithmic efficiency on fixed-size inputs
Common Patterns
Backtracking
DFS/BFS
Hashing
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
1.4k
/2.6k
Acceptance Rate
52.5%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
a =
b =
c =
d =
Output
Expected