Goldman Sachs Interview Question

Inorder traversal using an array