Bottom View of a Binary Tree

Given a binary tree, return its bottom view.

For every vertical line (same horizontal distance), keep the node that is deepest in the tree. If two nodes have the same depth and horizontal distanc...

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: