Probability, Statistics, Distributed Systems, Software Engineering, Interview Questions.
recurrence relation as follows: P(M, N, H)=(sum K=0 to H) (M chooses K)*P(M-K, N-1, H) It implies that, for the 1st slot, we can select K keys out of M keys where K can vary from 0 to H. After this selection is made, we have M-K keys remaining and N-1 slots. So we again call this method recursively