Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 470. Implement Rand10() Using Rand7()
Implement rand10() using only the uniform rand7() API so that outputs 1..10 are equally likely; the core challenge is converting a size-7 uniform distribution into size-10 (typically by combining samples and using rejection sampling or base expansions) while minimizing the expected number of rand7() calls.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.