</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

Design Top-K System — Section 8: Advanced Deep Dive Q&A (Principal Level)

Goal of this section: Address the hardest follow-up questions interviewers ask at Staff/Principal level and provide ideal model answers.


Q1. How do you compute Global Top-K across regions?

Answer:
We use a hierarchical aggregation model.

  1. Compute Top-K per region independently
  2. Emit regional Top-K candidates
  3. Merge regional candidates into a global heap
  4. Produce Global Top-K

This avoids scanning all items globally and limits the candidate set to K * regions.


Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.