Goldman Sachs Interview Question

Implement a stack and bfs