MongoDB interview questions

Tech / SWE · 10 questions
Report an interview →

Browse 10 MongoDB interview questions for software engineering and software development interview preparation. Questions in this collection are tagged for full-time roles. Explore the topics and stages below and filter the collection to plan your practice.

Interview stages in this collection
Phone screen, Onsite, Online assessment (OA)
Practice topics
Array (5), Hash Table (5), Breadth-First Search (2), Depth-First Search (2), Design (2), Heap (2), Linked List (2), String (2)

Questions come from candidate contributions and online research. Reports reflect past experiences and do not guarantee what MongoDB will ask. Locked question details require points. Public examples below are free to read.

Read 3 free MongoDB interview question examples

Browse all MongoDB questions

10 questions

Free MongoDB interview question examples

Read the full problem statements and use the links to revisit or share a specific example.

Word Break

Medium · Phone screen · Onsite · Full-time

Word break came up in my MongoDB phone interview. Given a string and a word dictionary, determine if the string can be split into valid dictionary words. The interviewer followed up with returning all possible segmentations, which is a much harder variant. They also asked about optimizing the dictionary lookups if the dictionary is very large.

Web Crawler MT

Medium · Onsite · Phone screen · Full-time

Got the multithreaded web crawler in my MongoDB onsite and it felt very on-brand for them. Given a start URL and an HTML parser, crawl all URLs on the same hostname using multiple threads. The hard part was coordinating thread-safe access to the visited set and knowing when all threads are done. I used a concurrent hash set and a thread pool with a countdown mechanism. The interviewer drilled into race conditions and asked about deadlock scenarios.

Intersection of Arrays

Easy · Online assessment (OA) · Full-time

Warm-up question from my MongoDB phone interview. Find the intersection of two integer arrays, returning only unique elements. I threw both into hash sets and checked the intersection. Pretty simple, but the interviewer extended it by asking how I'd handle it if both arrays were already sorted, and then what if one array is much larger than the other and you want to minimize disk reads in an external storage context, which felt very MongoDB-relevant.