Moody's interview question

solve a probability question