MongoDB·Software Engineer·Technical Phone Screen
- Given two iterators over sorted, deduplicated sequences, implement a new iterator that produces their union in sorted order with no duplicates.
- Generalize the sorted union iterator to k sorted, internally-deduplicated iterators. Walk through the data structure, time complexity, space complexity, and edge cases.
“Two-iterator version felt manageable.”