Customized probability function

Medium

Given a function called rand5, that returns an integer between 1 and 5 (inclusive) with uniform probability, implement rand7, a function that returns an integer from 1 to 7 with uniform probability....

Sign in to InterviewQs to view this question

Or

New to InterviewQs? Sign up now.

By proceeding, you agree to our Terms and Conditions and Privacy Policy.

Loading editor...