Day 108 of 133
Design search ranking (Amazon/Google) + DSA review
Relevance vs freshness vs diversity; LTR; long-tail queries.
DSA · NeetCode Binary Search
- Search A 2d MatrixDSA · Binary Search
Interview questions to prep
- State your loop invariant precisely — what must be true on every iteration?
- Why does the loop terminate, and how do you avoid infinite loops on the search-space update?
- Walk through edge cases: empty array, target smaller than min, target larger than max, duplicates.
ML System Design · Search ranking
Interview questions to prep
- Walk me through designing Amazon's product search.
- How do you balance relevance, freshness, and diversity in search ranking?
- How would you handle long-tail queries with no historical data?
- How would you adapt this design to LinkedIn Recruiter search where query intent, candidate freshness, and recruiter feedback matter?
- What changes when ranking marketplace/search results for language-understanding-heavy queries with sparse historical clicks?
Interview questions to prep
- Compare pointwise, pairwise, and listwise LTR — when does each fit?
- Why does pairwise LTR usually beat pointwise on click-data, even though pointwise is simpler?
References & further reading