Pregunta de entrevista de Goldman Sachs

Write code to print top view of a binary tree.