Amazon Interview Question

Direct questions from geeksforgeeks. Vertical sum in a binary tree