Microsoft Interview Question

to solve a problem solving problem related to probability and prefix sums