Infosys Interview Question

How would you handle this situation in MongoDB?