Fall SalePremium questions, over 25% offUnlock all premium questions for over 25% off
Maximum Consecutive ON Servers
Hard
Question
A company runs a cluster of n servers, and each server is either "ON" or "OFF". To change states, the team maintaining the cluster can use a single special operation: pick a contiguous range of servers and toggle every server in it, so "ON" becomes "OFF" and "OFF" becomes "ON". Because of operational restrictions, the cluster permits no more than k uses of it.
...
Asked at:Amazon
More Amazon interview questions
- Merge Values Into Contiguous Blockshard
- Find Smallest Available Hubmedium
- Frequent Events Within 24 Hoursmedium
- Compress Nodes In N-ary Treemedium
- Assign Books To Shelvesmedium
- Minimum Warehouse Redistribution Costmedium
- Detect Obfuscated Abusive Wordshard
- Minimum Variant Conversion Costmedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.