Microsoft interview question

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