Engaged Employer
Round 1. Tweaked version of this - https://www.geeksforgeeks.org/problems/bottom-view-of-binary-tree/1 Given a tree, find bottom view - 1 / \ 3 2 / \ / \ 4 5 6 7 Expected output - 4 3 5 6 2 7 (Not 4 3 6 2 7)
Anonymous
I have solved using level order traversal and keeping track of the horizontal distance and depth of the tree. Interviewer was satisfied with my code, moved to next round
Check out your Company Bowl for anonymous work chats.