InterviewStack.io LogoInterviewStack.io

Complexity Analysis and Performance Modeling Questions

Analyze algorithmic and system complexity including time and space complexity in asymptotic terms and real world performance modeling. Candidates should be fluent with Big O, Big Theta, and Big Omega notation and common complexity classes, and able to reason about average case versus worst case and trade offs between different algorithmic approaches. Extend algorithmic analysis into system performance considerations: estimate execution time, memory usage, I O and network costs, cache behavior, instruction and cycle counts, and power or latency budgets. Include methods for profiling, benchmarking, modeling throughput and latency, and translating asymptotic complexity into practical performance expectations for real systems.

HardTechnical
87 practiced
You deploy a new model version and observe a 30% slowdown in p95 inference latency across the fleet. Outline a systematic debugging plan to isolate the root cause across model changes, runtime or driver updates, hardware differences, dependency upgrades, and infra changes. List the metrics, traces, and binary-search rollback steps you would execute and quick mitigations to restore SLA.
HardSystem Design
80 practiced
Design a performance and bandwidth model for a federated learning setup with M clients, local update size U bytes per round, R communication rounds, and fraction p of clients participating per round. Include heterogenous client connectivity (varying bandwidths and latency), partial participation, and techniques like update compression and secure aggregation. Estimate total bytes transferred and expected wall-clock time for a single federated round.
HardSystem Design
63 practiced
Design a serving architecture for a generative text API that must handle 500 requests/second with median latency < 100ms and p99 < 500ms under cost constraints. Consider batching strategies, GPU sharing, RPC and serialization overhead, model warm vs cold containers, and admission control. Provide a performance model estimating required GPUs, acceptable batch sizes, and trade-offs between batching and tail latency.
HardTechnical
80 practiced
Explain how increasing batch size affects per-step throughput on GPU, end-to-end time-to-train, and generalization for SGD-based optimizers. Construct a performance model incorporating GPU throughput scaling with batch size, effective learning-rate scaling (linear scaling rule), and communication cost per step in distributed training. Describe experiments you would run to validate the model and tune hyperparameters for large-batch training.
HardTechnical
66 practiced
Design a metric that combines throughput, SLO (latency) compliance, and energy cost per inference to rank cloud instance types when selecting hardware for model serving. Describe how to collect the inputs (throughput tests, latency percentiles, power telemetry), normalize and weight them, and how you'd use this composite metric to choose instances under a budget and SLO constraint.

Unlock Full Question Bank

Get access to hundreds of Complexity Analysis and Performance Modeling interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.