Skip to main content
All Questions

Count the valid Active/Idle configurations of warehouse robots given thresholds.

Unlock detailed company stats for this questionUpgrade

At an Amazon warehouse there are n robots; arr[i] is the threshold of the i-th robot. Each robot is either Active (operating) or Idle (waiting for tasks). A configuration is valid if: for every Active robot, the total number of active robots is >= arr[i]; for every Idle robot, the total number of idle robots is strictly < arr[i]. Each robot must be assigned exactly one state, and a configuration is valid only if no robot violates its condition. Given arr, return the number of valid configurations.

Format · Amazon SDE intern on-campus OA, March 2026.

Community answers

No answers contributed by the community yet.

Related courses

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

System Design Interviews

Learn how to answer the latest system design questions across product, infrastructure, and AI domains. Features in-depth video examples, written breakdowns, and helpful reference patterns. Watch senior engineers and managers answer these questions in mock interview videos.