Tree Bottom View


my code is crrct, all test cases are passed, i have referred the code from geeks of geeks, plz let me know after the mapping as soon as the while loop closes how the for loop for printing value is working to give bottom view in viewBottom()

Anshul, I would recommend you to go through this online video on bottom view of binary tree as,


And then if you dont understood , pls let me know…