MongoDB Interview Question

DSA questions, what time complexity is this code