You are viewing a single comment's thread. Return to all comments →
I agree with @Faland.
The problem is not well described.
So, first I searched the internet for top view problem and solved it.
In fact a correctly solved problem failed the test case. So, I calculated manually and my solution was correct.
It took me lot of time to understand that there is meant something else, after looking in this discussion.
So, the problem here is not correctly described. Here is also info about top view:
Don't cover you with mathematical description. Look through the window, see a tree. What will be the top view of a tree if you cut a branch? Don't cover you with the fact that you can't provide a mathematical description. An algorithm is already a mathematical description, see youtube link. Any tree that is seen through the windows is all maths.