Reservoir Sampling Probability
Reservoir sampling keeps k items from a stream of n items. Print the probability that any one specific item ends up in the final sample, as a reduced fraction.
Constraints
1 <= k <= n <= 10^9
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.