ABC Interview Question

bottom view of binary tree