Return the border nodes of a binary tree in clockwise order.
Unlock detailed company stats for this questionUpgrade
Return the borders of a binary tree clockwise, starting from the root, then the right side, bottom and left side. Example: for the tree 1 with children 2 and 3, 2 with children 4 and 5, and 3 with left child 6, the output is [1,3,6,5,4,2]. The candidate tried DFS to collect edge nodes but did not reach a runnable solution.
Community answers
No answers contributed by the community yet.


