Recognizing Patterns and Selecting Algorithms Questions
Ability to recognize problem patterns and know which algorithm/data structure is appropriate. Includes pattern matching like 'this looks like a sliding window problem' or 'this is a backtracking problem'.
EasyTechnical
94 practiced
You must report approximate daily unique active users for millions of users with tight memory limits. Explain the HyperLogLog (HLL) algorithm pattern, how to choose the number of registers (m) for a target standard error, how merging across shards works, and trade-offs vs exact counting.
HardSystem Design
87 practiced
Design a time-series rollup algorithm and data layout to support multi-resolution queries efficiently (e.g., raw 1s for 7 days, 1m rollups up to 90 days, 1h rollups up to 3 years). Describe data structures (segment-tree-like, chunked pre-aggregates), compression methods, and query execution plan for arbitrary range aggregates. Explain trade-offs between write cost, storage, and query latency for SRE monitoring dashboards.
EasyTechnical
73 practiced
You receive a stream of API request timestamps and an alert: 'More than N requests within any T-second window for user X'. Without writing code, explain how to recognize this as a sliding-window problem and pick which sliding-window variant you'd use (fixed window, sliding counter/deque, token bucket) for an SRE use case. Mention how you would handle late-arriving timestamps and clock skew between nodes.
EasyTechnical
89 practiced
You must deduplicate event IDs in a high-velocity stream with constrained memory and long retention. Compare using an exact hash-set vs probabilistic structures like Bloom filters and Cuckoo filters. For each option, explain false positive / false negative characteristics, memory costs, and the scenarios in SRE where each is acceptable (e.g., idempotent ingestion pipelines or strict deduplication).
MediumTechnical
65 practiced
Your alerting system generates 10k alerts per hour with many near-duplicates. Propose an algorithmic pipeline to cluster alerts in near real-time to reduce noise. Discuss feature extraction (text normalization, fingerprints, service id, stack trace), similarity measures, candidate algorithms (hashing, MinHash+LSH, streaming clustering), and how to evaluate cluster quality.
Unlock Full Question Bank
Get access to hundreds of Recognizing Patterns and Selecting Algorithms interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.