You are viewing a single comment's thread. Return to all comments →
If we take the tree as in Faland's comment.
1 / \ 2 3 / \ 4 5 \ 6 \ 7
The answer for which the compiler successfully runs the test is 4-2-1-3-7
and for
1 / \ 2 3 / \ 4 5 / 6 / 7 / 8
output is 8-4-2-1-3 which compiler accepts.
You may refer geeks for geeks for the top view.
Seems like cookies are disabled on this browser, please enable them to open this website
Tree : Top View
You are viewing a single comment's thread. Return to all comments →
If we take the tree as in Faland's comment.
The answer for which the compiler successfully runs the test is 4-2-1-3-7
and for
output is 8-4-2-1-3 which compiler accepts.
You may refer geeks for geeks for the top view.