Domanda di colloquio di Goldman Sachs

Write code to print top view of a binary tree.