MongoDB SDE OA 2025 | B-Tree Index Scan Intersection & MVCC Time Travel Store
Question · Posted Jun 2026
Problem 1 - B-Tree Index Scan Intersection Problem Statement The MongoDB query optimizer executes multiple parallel index scans. You are given a 2D array: scans where each inner array is sorted and contains unique document IDs returned by an index scan. You are also given an integer M. Return a sorted list of all document IDs that appear in at least M scans. Constraints Constraint 1 ≤ N ≤ 1000 Total document IDs across all scans ≤ 105 Each scan ...
The full answer & interview discussion are available to premium members.
Log in Create a free account