Goldman Sachs Interview Question

Array and stack coder pad