can you please give some hints.
No idea clicking in this question
Refer these links https://www.geeksforgeeks.org/print-binary-tree-vertical-order/ https://www.geeksforgeeks.org/print-binary-tree-vertical-order-set-2/
https://ide.codingblocks.com/s/258940 iām confused my tree is printing garbage Values and i dont have idea how i pass the root node to map values i
Your code is working for the case there in your code.
Share the case for which it was giving garbage values. You can dry run with it to check the flaw.
Also refer the above links to cross check the approach