Vikas Group interview question

Bernoulli