We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Data Structures
- Trees
- Tree : Top View
- Discussions
Tree : Top View
Tree : Top View
Sort by
recency
|
964 Discussions
|
Please Login in order to post a comment
I try to find a better definition of top view since the one presented is terrible: the list nodes, from left to the right, that projected vertically from the top to the bottom, are NOT covered by other nodes.
The definition of top view is not clear at all. There should be at least two examples with expected output to help understand a better description.
My Java 8 Solution
public static void topView(Node root) { if (root == null) return;
}
Here's My Python 3 Code
Any suggestion to increase efficiency are appreciated please