Tecnotree Interview Question

Data structure