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
|
931 Discussions
|
Please Login in order to post a comment
I am trying the below solution but it says "wrong answer".
Can anyone please help me in this?
C++ using Breadth-First Search (more at https://github.com/IhorVodko/Hackerrank_solutions , feel free to give a star :) )
I dont think this is easy by any means... When you have to combine hash tables, queues WITH trees, thats not a beginner level.
def topView(root): if not root: return -1
JAVA: here is my resolution of this problem: