Top-K Frequent in Large Logs
Asked at Google · Coding Questions · Difficulty: Medium · Last asked Jul 19, 2026
Coding round staple: parse a log/chat stream and return the top-K most-frequent keys (users, IPs, words). The walk-through covers heap vs quickselect vs bucket sort, complexity, and scale-out follow-ups (large file, memory limit, distributed).
Loading the problem…
More Google interview questions
- LLM conceptual questions
- Implement a Nested Tic-Tac-Toe Game Engine
- ML Fundamentals Deep Dive (AI/ML & MLE Roles)
- Design a Real-Time Product Recommendation System
- Implement Scaled Dot-Product Attention
- Design a Multi-Tenant, Multi-Region API Rate Limiter