One2N interview question

Problem statement on system design.