Microsoft interview question

Coding - Tries, Monte Carlo Variance reduction