Probability, Statistics, Distributed Systems, Software Engineering, Interview Questions.
for all N slots. G(M, N, H) = (sum k=0 to H-1) (M chooses k) * G(M-k, N-1, H) base case: G(M, 1, H) = 1 if M < H else 0 Probability p = G(M, N, H)/N^M Probability that at-least one slot with greater than equal to 'u' keys = 1-(G(M, N, u)/N^M) Python implementation: Time complexity is O(M*N*H) def