Day 109 of 133
Design ads CTR prediction at scale + DSA review
Billion-cardinality features; cross features; calibration.
DSA · NeetCode Heap / Priority Queue
- Kth Largest Element IN A StreamDSA · Heap / Priority Queue
Interview questions to prep
- Why is a heap the right structure? Could a balanced BST or sorted list work — why is heap better?
- Explain the heap-of-k pattern: keep size k, push new, pop if over k. What's the resulting complexity?
- What does the comparator look like, and how would you tweak it to flip min/max behaviour?
ML System Design · Ads CTR
Interview questions to prep
- Walk me through designing Meta's ad CTR prediction system.
- How do you handle billion-cardinality features (user_id, ad_id) at scale?
Interview questions to prep
- How do cross features (e.g., user × ad) work, and how do you scale them?
- When does DCN / DeepFM beat hand-crafted cross features in production?
Interview questions to prep
- Why is calibration critical for ad ranking, and how do you evaluate it?
- How would you recalibrate after a model retrain without disturbing existing bid logic?
References & further reading