Druva Interview Question

Data Structure, problem solving.