Halloween Sale
Unlock all premium questions for over 30% 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
- Assign Books To Shelvesmedium
- Compress Nodes In N-ary Treemedium
- Frequent Events Within 24 Hoursmedium
- Find Smallest Available Hubmedium
- Assemble String From Blocksmedium
- All String Reorganizationseasy
- Find Oldest One-Time Visitormedium
- Smallest Lexicographic Palindromemedium
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.