Rippling Interview Question

Generic Tree based DSA question