Goldman Sachs Interview Question

Leetcode hard. Easy-medium probability questions