Tree top view problem

i am unable to form the code.
pls tell the code.

@yutikakhanna
hello yutika,

refer this article for all other approaches -> https://www.geeksforgeeks.org/print-nodes-top-view-binary-tree/

i tried implementing the same …but it is showing a few errors. can u pls provide the code.