InterviewStack.io LogoInterviewStack.io

Optimization Under Constraints Questions

Technical approaches for optimizing code and systems when operating under constraints such as limited memory, strict frame or latency budgets, network bandwidth limits, or device specific limitations. Topics include profiling and instrumentation to identify bottlenecks, algorithmic complexity improvements, memory and data structure trade offs, caching and data locality strategies, parallelism and concurrency considerations, and platform specific tuning. Emphasize measurement driven optimization, benchmarking, risk of premature optimization, graceful degradation strategies, and communicating performance trade offs to product and engineering stakeholders.

HardSystem Design
32 practiced
Design a high-throughput event processing pipeline built on serverless functions with constraints: cold starts up to 300ms, per-invocation memory limit 512MB, and throughput requirement 200k events/sec. Propose batching, provisioned concurrency, hybrid worker pools, idempotency, and consistency guarantees to meet throughput and latency goals.
MediumTechnical
33 practiced
Implement exponential backoff with full jitter in Python. Provide a function backoff(attempt, base_delay_ms, max_delay_ms) that returns a delay in milliseconds. Explain why jitter helps and suggest sensible defaults and cancellation integration (eg via context or timeout).
EasyTechnical
28 practiced
List situations where caching can hurt system performance or reliability (eg stale data, cache thrashing, memory pressure, cache stampede). For each situation, propose mitigation strategies and detail criteria to disable or adjust caching.
HardTechnical
28 practiced
Design an alerting policy that reduces alert fatigue while ensuring timely detection of performance regressions. Describe alert severity levels, grouping, suppression windows, escalation paths, runbook integration, and how to use SLOs and error budgets to prioritize and suppress non-actionable alerts.
MediumTechnical
29 practiced
Design a benchmarking plan to validate a performance patch that claims to reduce mean latency by 15% under production-like load. Include environment setup, dataset seeding, warmup, number of runs, statistical tests, metrics to collect, noise controls, and rollback criteria if the patch regresses performance.

Unlock Full Question Bank

Get access to hundreds of Optimization Under Constraints interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.