Goldman Sachs Interview Question

brain teasers, programming