(This question is a variation of the LeetCode question 470. Implement Rand10() Using Rand7(). If you haven't completed that question yet, it is recommended to solve it first.)
A biased coin is available through the provided method getRandom01Biased(). It takes no arguments and returns 0 with probability p and 1 with probability 1 - p. Calls are independent and use the same p, where 0 < p < 1.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Stdout
-