Find Minimum Time Required (Amazon Bangalore :)
Problem Overview
- Compute the minimum total time to process all requests so identical regions are at least minGap apart.
- Input: String requests (each char is a region) and int minGap; each request takes 1 time unit.
- Output: int for minimal processing time; requests may be reordered and idle gaps allowed.
- Real-world context: server rate limiting prototype at Amazon.
- Amazon Bangalore interview question; classic coding interview problem for a coding interview.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
