Goldman Sachs Interview Question

coding question and debugging question