Implement Rand10() using Rand7() with rejection sampling.
Unlock detailed company stats for this questionUpgrade
A rejection sampling problem, very similar to rand7() -> rand10() (LeetCode 470). The round expected explaining and solving it mathematically, then coding it.
Community answers
No answers contributed by the community yet.
Related questions
Implement binary search using recursion.Implement addTicket, removeTicket and getRandom with weighted random selection.Related courses

Course

