Build Ranked Feed With Photo Batching
Company: Nextdoor
Role: Machine Learning Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This question evaluates algorithmic reasoning and data manipulation skills, including stable sorting, grouping/batching, and merging of ranked items while preserving ordering invariants.
Constraints
- 0 <= len(feed_objects) <= 100000
- Each object has unique `id`
- Each `type` is one of `Normal`, `Video`, or `Photo`
- Scores are numeric values and may be negative or duplicated