MongoDB

MongoDB Software Engineer Onsite Coding Questions

11+ questions from real MongoDB Software Engineer Onsite Coding rounds, reported by candidates who interviewed there.

11
Questions
8
Topic Areas
10+
Sources

What does the MongoDB Onsite Coding round test?

The MongoDB onsite coding round is the core technical evaluation. Software Engineer candidates typically see 2-3 algorithm and data structure problems. Problems range from medium to hard difficulty, and interviewers evaluate both correctness and code quality.

Top Topics in This Round

MongoDB Software Engineer Onsite Coding Questions

LeetCode #208: Implement Trie (Prefix Tree). Difficulty: Medium. Topics: Hash Table, String, Design, Trie. Asked at MongoDB in the last 6 months.

LeetCode #1146: Snapshot Array. Difficulty: Medium. Topics: Array, Hash Table, Binary Search, Design. Asked at MongoDB in the last 6 months.

LeetCode #146: LRU Cache. Difficulty: Medium. Topics: Hash Table, Linked List, Design, Doubly-Linked List. Asked at MongoDB in the last 6 months.

LeetCode #139: Word Break. Difficulty: Medium. Topics: Array, Hash Table, String, Dynamic Programming, Trie, Memoization. Asked at MongoDB in the last 6 months.

LeetCode #349: Intersection of Two Arrays. Difficulty: Easy. Topics: Array, Hash Table, Two Pointers, Binary Search, Sorting. Asked at MongoDB in the last 6 months.

LeetCode #23: Merge k Sorted Lists. Difficulty: Hard. Topics: Linked List, Divide and Conquer, Heap (Priority Queue), Merge Sort. Asked at MongoDB in the last 6 months.

## Problem Design and implement a hash table with efficient insert, lookup, and delete operations, likely discussing collision resolution strategies. ## Likely LeetCode equivalent LeetCode 706 - Design HashMap. ## Tags hash_table,design,swe

## Problem Given an array of integers, return the array of their squares sorted in non-decreasing order. ## Likely LeetCode equivalent LeetCode 977 - Squares of a Sorted Array. ## Tags sorting,two_pointers,arrays,swe

## Problem Implement a custom iterator or iterator combinator (e.g., peeking iterator, zip, or flatten), requiring understanding of the iterator design pattern. ## Likely LeetCode equivalent LeetCode 284 - Peeking Iterator. ## Tags design,iterator,ood,swe

## Problem Simulate rolling one or more dice, computing the probability distribution of outcomes or implementing a weighted random generator. ## Likely LeetCode equivalent LeetCode 528 - Random Pick with Weight. ## Tags probability,simulation,math,swe

## Problem Implement a simplified regex matcher supporting characters like '.', '*', or specific character classes against an input string. ## Likely LeetCode equivalent LeetCode 10 - Regular Expression Matching. ## Tags strings,dynamic_programming,recursion,swe

See All 11 Questions from This Round

Full question text, answer context, and frequency data for subscribers.

Get Access