Fall SalePremium questions, over 25% offUnlock all premium questions for over 25% off
Minimum Warehouse Redistribution Cost
Medium
Question
There are n warehouses placed around a circle and numbered 0 through n - 1. Going clockwise, warehouse i is linked to warehouse (i + 1) % n. At the start, warehouse i stores products[i] units, and the total number of units is guaranteed to be a multiple of n. The aim is to even out the stock so that all warehouses finish with equal unit counts.
...
Asked at:Amazon
More Amazon interview questions
- Detect Obfuscated Abusive Wordshard
- Minimum Variant Conversion Costmedium
- Diagonal Server Redirect Pathhard
- Prefix Frequency Block Partitioneasy
- Smallest Lexicographic Palindromemedium
- Connect Points In Unbounded Matrixhard
- Find Oldest One-Time Visitormedium
- All String Reorganizationseasy
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.