MongoDB Interview Question

Space and time complexity analysis