Paytm Money Interview Question

View of a binary tree