MongoDB Software Engineer Interview Questions
36+ questions from real MongoDB Software Engineer interviews, reported by candidates.
Round Types
Top Topics
Questions
Mongo DB software engineer 3 interview experience
I have an upcoming technical interview for a Software Engineer III role at MongoDB and would appreciate any insights on what to expect. I’ve gone through various interview experiences, but they seem q
Any recommendations or advice on what the process looks like? I’m on my first round
LeetCode #208: Implement Trie (Prefix Tree). Difficulty: Medium. Topics: Hash Table, String, Design, Trie. Asked at MongoDB in the last 6 months.
#1146 Snapshot Array
LeetCode #1146: Snapshot Array. Difficulty: Medium. Topics: Array, Hash Table, Binary Search, Design. Asked at MongoDB in the last 6 months.
#146 LRU Cache
LeetCode #146: LRU Cache. Difficulty: Medium. Topics: Hash Table, Linked List, Design, Doubly-Linked List. Asked at MongoDB in the last 6 months.
#139 Word Break
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.
#23 Merge k Sorted Lists
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.
MongoDB call to reject?
I did their karat interview for the next in tech summit. the recruiter says they have my results and want to schedule a 15 min call. do they call people just to reject? from what I could find is that
Had anyone gave "day in life" interview for the Application Delivery Consultant. Please share the experience what are the topics they have asked
Hi, Can anyone please guide me what all should I prepare for MongoDB Senior Java Dev interview ?
Interview Questions
1. You have a REST based API and how can you allow calls from mobile devices only ? 2. What is the difference between MongoDB and Elasticsearch ? 3. Suppose you have a database with 1 TB of data and y
## Round 1 - Coding ## Problem Design a billing system that creates invoices, adds line items, applies discounts, and computes totals with tax. ```python class LineItem: def __init__(self, description: str, quantity: int, unit_price: float): ... class Invoice: def __init__(self, invoice_id: str, customer: str, tax_rate: float): ... def add_item(self, item: LineItem) -> None: ... def apply_discount(self, percent: float) -> None: # on subtotal ... def subtotal(self) -> float: ... def total(self) -> float: # after discount and tax ... def summary(self) -> str: ... ``` ## Example ``` inv = Invoice("INV-001", "Acme Corp", tax_rate=0.08) inv.add_item(LineItem("Widget", 5, 10.00)) inv.add_item(LineItem("Gadget", 2, 25.00)) inv.subtotal() -> 100.0 # 5*10 + 2*25 inv.apply_discount(10) # 10% off inv.total() -> 97.20 # 90 * 1.08 ``` ## Follow-ups 1. How do you handle discounts that apply only to specific line items versus the entire invoice? 2. How would you represent recurring invoices that auto-generate monthly? 3. What happens if `apply_discount` is called multiple times — do they stack or replace? 4. How do you serialize an invoice to JSON for API responses?
## Problem Decode a binary-encoded string or number back to its original form, likely involving bit manipulation or base conversion. ## Likely LeetCode equivalent No unambiguous single LC equivalent. ## Tags binary,math,strings,swe
## Round 1 - Coding ## Problem Given a social network as a list of friendships, recommend potential friends for a user. Recommendations are users who are not already friends with the target user but share the most mutual friends. Exclude the user themselves. ```python def recommend_friends(friendships: list[tuple[str,str]], user: str, top_k: int) -> list[str]: # returns top_k recommended users sorted by mutual friend count desc, # ties broken alphabetically ... ``` ## Example ``` friendships = [ ("Alice","Bob"),("Alice","Carol"),("Bob","David"), ("Carol","David"),("David","Eve"),("Alice","Eve") ] recommend_friends(friendships, "Alice", top_k=2) # Alice's friends: {Bob, Carol, Eve} # David: shares Bob, Carol, Eve -> 2 mutuals (Bob,Carol) [Eve shares but Alice-Eve exists] # Actually David shares Bob and Carol with Alice -> 2 mutuals # -> ["David", ...] ``` ## Follow-ups 1. What is the time complexity of your approach? Can you reduce it using adjacency sets? 2. How would you handle a directed graph (follow vs. friend) instead of an undirected one? 3. How would you extend recommendations to include second-degree connections with lower weight? 4. At scale (100M users), how do you compute mutual friend counts efficiently?
## Problem Implement a hash map from scratch, covering put, get, and remove operations with collision handling. ## Likely LeetCode equivalent LeetCode 706 - Design HashMap. ## Tags hash_table,design,swe
## 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 Process a sliding window of integers, likely computing a running statistic (max, sum, or average) over a fixed-size window. ## Likely LeetCode equivalent LeetCode 239 - Sliding Window Maximum. ## Tags sliding_window,heap,arrays,swe
## Problem Find the intersection of two arrays or sets, returning elements that appear in both. ## Likely LeetCode equivalent LeetCode 349 - Intersection of Two Arrays. ## Tags arrays,hash_table,two_pointers,swe
See All 36 MongoDB Software Engineer Questions
Full question text, answer context, and frequency data for subscribers.
Get Access