MongoDB Interview Question

Generic leet code style question in pair programming format, but requirements evolved. Answering to what the interviewer expects can be difficult, because the requirements are not very clear