PracHub
QuestionsLearningGuidesInterview Prep
|Home/Coding & Algorithms/Amazon

Find the Minimum Processing Rate to Meet a Deadline

Last updated: Jul 22, 2026

Quick Overview

Find the smallest integer processing rate that completes independent workloads before a deadline when unused hourly capacity cannot be shared. The problem tests monotonic feasibility, integer ceiling arithmetic, search bounds, overflow awareness, and efficient handling of large inputs.

  • medium
  • Amazon
  • Coding & Algorithms
  • Software Engineer

Find the Minimum Processing Rate to Meet a Deadline

Company: Amazon

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

# Find the Minimum Processing Rate to Meet a Deadline You have several independent workloads. During each hour, a worker chooses one workload and processes up to `rate` units from it. If that workload contains fewer than `rate` remaining units, the worker finishes it and the unused capacity in that hour cannot be applied to another workload. Find the smallest positive integer `rate` that finishes all workloads within `hours` hours. ## Function Signature ```python def min_processing_rate(workloads: list[int], hours: int) -> int: ``` ## Inputs - `workloads[i]` is the positive size of workload `i`. - `hours` is the maximum total number of hourly processing slots. - It is guaranteed that `hours >= len(workloads)`, so a feasible rate exists. ## Output Return the minimum positive integer processing rate that completes every workload within the deadline. ## Constraints - `1 <= len(workloads) <= 100_000` - `1 <= workloads[i] <= 10^9` - `len(workloads) <= hours <= 10^9` - The input array must not be mutated. ## Examples ```text workloads = [3, 6, 7, 11] hours = 8 output = 4 ``` ```text workloads = [30, 11, 23, 4, 20] hours = 5 output = 30 ```

Quick Answer: Find the smallest integer processing rate that completes independent workloads before a deadline when unused hourly capacity cannot be shared. The problem tests monotonic feasibility, integer ceiling arithmetic, search bounds, overflow awareness, and efficient handling of large inputs.

Related Interview Questions

  • Compute Edit Distance - Amazon (medium)
  • Minimize Replacements So Equal Product Values Are Contiguous - Amazon (hard)
  • Find a Maximum-Sum Window in a Sparse Array - Amazon (hard)
  • Add One Source to Minimize Grid Inconvenience - Amazon (medium)
  • Implement a Half-Open Interval Range Module - Amazon (hard)
|Home/Coding & Algorithms/Amazon

Find the Minimum Processing Rate to Meet a Deadline

Amazon logo
Amazon
May 29, 2026, 12:00 AM
mediumSoftware EngineerOnsiteCoding & Algorithms
0
0

Find the Minimum Processing Rate to Meet a Deadline

You have several independent workloads. During each hour, a worker chooses one workload and processes up to rate units from it. If that workload contains fewer than rate remaining units, the worker finishes it and the unused capacity in that hour cannot be applied to another workload. Find the smallest positive integer rate that finishes all workloads within hours hours.

Function Signature

def min_processing_rate(workloads: list[int], hours: int) -> int:

Inputs

  • workloads[i] is the positive size of workload i .
  • hours is the maximum total number of hourly processing slots.
  • It is guaranteed that hours >= len(workloads) , so a feasible rate exists.

Output

Return the minimum positive integer processing rate that completes every workload within the deadline.

Constraints

  • 1 <= len(workloads) <= 100_000
  • 1 <= workloads[i] <= 10^9
  • len(workloads) <= hours <= 10^9
  • The input array must not be mutated.

Examples

workloads = [3, 6, 7, 11]
hours = 8
output = 4
workloads = [30, 11, 23, 4, 20]
hours = 5
output = 30

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.