Goldman Sachs Interview Question

an array question using pointers