InterviewStack.io LogoInterviewStack.io

Performance Under Resource Constraints Questions

Optimizing in environments with hard limits on compute, memory, battery, or bandwidth. Covers mobile and embedded performance, energy and power efficiency, working within tight memory and CPU envelopes, and platform-specific optimization and constraints. Emphasizes the trade-offs unique to constrained targets rather than server-class assumptions.

HardSystem Design
44 practiced

You must process a very large stream of numbers to compute sliding window maxima but the window size k can be larger than available RAM and the stream is much larger than memory. Design an algorithm or system that produces exact sliding window maxima with minimal memory and disk I/O. Discuss block techniques, precomputation (prefix/suffix), trade-offs, and complexity.

EasyTechnical
29 practiced

Explain data locality and why it matters for backend performance. Discuss CPU cache effects, spatial and temporal locality, and how changing data layout (array-of-structures vs structure-of-arrays) or reordering loops can improve throughput on hot code paths.

MediumTechnical
34 practiced

You must choose between shipping a high-impact feature now or spending two sprints to reduce p99 latency of a critical service by 30%. How do you decide? Describe the data you would gather, stakeholders to consult, risk analysis, mitigation strategies, and how you would communicate the decision to both engineering and product teams.

HardTechnical
25 practiced

A cloud VM running several JVM instances shows CPU oversubscription and high context switching with increased steal time, hurting latency. Explain how to detect oversubscription, correlate CPU scheduling metrics with application latency, and propose mitigations such as right-sizing instances, CPU affinity, cgroups or QoS, and autoscaling strategies.

EasyTechnical
31 practiced

In Python, implement a FixedWindowAverage class that maintains the last N integer values and returns the current moving average on each update. Requirements: O(1) time per update, O(N) memory, no external libraries, handle N up to 1,000,000. Briefly describe thread-safety considerations for multi-threaded backends.

Unlock Full Question Bank

Get access to all 44 Performance Under Resource Constraints interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.