InterviewStack.io LogoInterviewStack.io

Problem Analysis & Optimization Questions

Core technical skills covering problem analysis, algorithmic thinking, and performance optimization. Includes evaluating time and space complexity, selecting appropriate data structures, designing efficient algorithms, and considering trade-offs to optimize software systems.

MediumTechnical
0 practiced
You run a real-time feature store with high-cardinality categorical features used in online scoring. Propose data structures and encoding strategies to minimize memory footprint and lookup latency: consider hashing tricks, compressed embedding tables, tiered storage (in-memory LRU + SSD), cold-key aggregation, and eviction policies. Discuss consistency and replication concerns.
EasyTechnical
0 practiced
List common data structures (array, linked list, hash map, heap, balanced BST, trie) and for each state time complexities for typical operations (access, insert, delete, search). Then, for ML application scenarios (feature lookup in a feature store, priority scheduling for beam search, streaming top-k, frequency counting), pick the most appropriate structure and justify your choice considering cache locality and memory overhead.
EasyTechnical
0 practiced
Implement a numerically stable online algorithm in Python to compute running mean and variance (Welford's algorithm) over a stream of floating-point data. Your implementation should support streaming updates, merging two summaries (for distributed shards), and returning current mean and sample variance without storing the full dataset. Explain time and space complexity.
MediumTechnical
0 practiced
Design an online algorithm to maintain a confusion matrix and approximate AUC for streaming binary classification predictions when you cannot store all labels. Describe memory-efficient data structures and algorithms, approximate AUC estimators (with error bounds), and how to merge partial metrics from distributed shards into a global estimator.
EasyTechnical
0 practiced
Implement reservoir sampling (Algorithm R) in Python to uniformly sample k items from a stream of unknown and potentially massive length that cannot fit in memory. The function should accept items one-by-one via an iterator, maintain only O(k) memory, and return a uniform sample at the end. Explain correctness and analyze time & space complexity.

Unlock Full Question Bank

Get access to hundreds of Problem Analysis & Optimization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.