Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 470. Implement Rand10() Using Rand7()
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source