InterviewStack.io LogoInterviewStack.io

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'.

HardTechnical
86 practiced
Capacity prediction/forecasting: choose an approach to predict CPU and traffic with daily/weekly seasonality and occasional outages. Compare SARIMA/ARIMA, Prophet, and LSTM-based models for SRE capacity planning. Describe feature engineering, cross-validation strategy, and how you'd evaluate forecasts relative to SLOs.
HardTechnical
96 practiced
You must find the most frequent (heavy-hitter) error messages in a massive log stream with tight memory. Compare algorithms: Space-Saving (Misra-Gries), Count-Min Sketch + heap, and reservoir/sample-based approaches. For each, explain accuracy guarantees, memory/time complexity, and suitability for SRE real-time dashboards.
MediumTechnical
75 practiced
Design (describe data structures and algorithm; pseudo-code acceptable) a streaming system in Python that receives events (timestamp, user_id) and continuously reports the top-k most active users in the last 24 hours. Memory cannot hold all events; explain how you would evict old events and how to merge per-shard summaries into a global top-k.
MediumTechnical
65 practiced
For performing health checks across a service dependency graph, when would you use BFS versus DFS? Discuss implications on memory, parallelism, shortest-path detection to failing components, and how branching factor and depth affect the choice in SRE tooling.
HardTechnical
73 practiced
Implement consistent hashing with virtual nodes in Python. Provide a class with methods: add_node(node_id), remove_node(node_id), and get_node(key). The implementation should place virtual nodes on a 32-bit hash ring and use bisect/search to locate node for a key. Ensure minimal remapping when nodes are added/removed.

Unlock Full Question Bank

Get access to hundreds of Recognizing Patterns and Selecting Algorithms interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.