Develop a version of getCoupon() that better models the situation when one of the coupons is rare:

Question:

Develop a version of getCoupon() that better models the situation when one of the coupons is rare: choose one of the n values at random, return that value with probability 1 /(1,000n), and return all other values with equal probability. Extra credit : How does this change affect the expected number of coupons that need to be collected in the coupon collector problem?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: