Object Reservoir interview question

logics