FastPrepMinimum Robot and Human Fulfillment Time
Problems/Minimum Robot and Human Fulfillment Time

Minimum Robot and Human Fulfillment Time

Amazon logoAmazon● MediumFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an Amazon full-time online assessment. The report does not give number limits or say what to do for an empty assignment. Our version is about 97% the same as the reported question.

An Amazon fulfillment center must process n orders. Order i must be assigned entirely to exactly one of two processing sides:

  • The automated robotics system processes all orders assigned to it in parallel. If it receives at least one order, its elapsed time is the maximum robotTime[i] among those orders.
  • The human workforce processes all orders assigned to it one by one. Its elapsed time is the sum of humanTime[i] across those orders.

The two sides work concurrently, so the elapsed time for an assignment is the maximum of the robotics-system time and the human-workforce time. For this exercise, an unused side contributes 0 hours.

Return the minimum possible elapsed time needed to process and dispatch every order.

Function

minimumFulfillmentTime(humanTime: long[], robotTime: long[]) → long

Examples

Example 1

humanTime = [9, 6, 8, 6, 4, 4]robotTime = [4, 3, 7, 7, 9, 8]return = 8

Assign the order with robotics time 9 and human time 4 to the human workforce, and assign every other order to the robotics system. The human side takes 4 hours, while the robot side takes 8 hours, so all orders finish in 8 hours.

No assignment can finish in 7 hours because both orders with robotics times above 7 would have to be handled by humans, requiring 4 + 4 = 8 hours.

Example 2

humanTime = [2, 3]robotTime = [10, 10]return = 5

Assign both orders to the human workforce. The human side takes 2 + 3 = 5 hours, and the unused robot side contributes 0 hours.

Constraints

  • 1 <= humanTime.length = robotTime.length <= 2 * 10^5
  • 1 <= humanTime[i], robotTime[i] <= 10^9
  • All sums and the returned result fit in a signed 64-bit integer.

More Amazon Online Assessment questions

  • Lexicographically Largest IdentifierOA · Seen Nov 2026
  • Maximize Shipment Order by Sorting One WindowOA · Seen Nov 2026
  • Top K Frequent ElementsOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Fill One Exact-Length Binary WindowOA · Seen Nov 2026
  • Minimum Grid InconvenienceOA · Seen Nov 2026
  • Maximize K-Element AND with an Increment BudgetOA · Seen Nov 2026
  • Task SchedulerOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Get Smallest Base SegmentOA · Seen Nov 2026
  • Minimum Cost of Left and Right PropagationOA · Seen Nov 2026
  • Maximum Equal-Bit Pairs in a SubsequenceOA · Seen Nov 2026

Similar questions at other companies

  • Capacity to Ship Packages Within DaysMicrosoft · OA · ONSITE INTERVIEWMicrosoft interview questions
  • Rock JumpingIMC Trading · OAIMC Trading interview questions
  • Minimize Maximum Group DifferenceDRW · OADRW interview questions
  • Array NullificationQRT · OA
  • Minimum-Cost Solar Rooftop AllocationDeloitte · OADeloitte interview questions
  • Three-Part Partition with Minimum Largest RangeLSEG · OALSEG interview questions
  • K-Means ClusteringAtlassian · OAAtlassian interview questions
  • Get Minimum Development TimeSalesforce · OASalesforce interview questions
  • Job ExecutionMathWorks · OAMathWorks interview questions
  • Police Station 🚓The D.E. Shaw Group · OAThe D.E. Shaw Group interview questions

Interview reports that mention this question

  • Amazon Full-Time OA Problems, Recent Reports (Part 4 of 5)

Amazon interview experiences

  • Amazon Experienced SDE Onsite Questions: 1 Experience
  • Amazon SDE Onsite Interview Questions: 9 Experiences
  • Amazon SDE II and L5 FDE Interview Questions: 4 Experiences
  • Amazon Full-Time OA Problems, Earlier Reports (Part 5 of 5)
  • Amazon New Grad OA Problems: Every Task We Have (Part 3 of 5)
See Amazon hiring insights
Saved
class Solution {
    public long minimumFulfillmentTime(long[] humanTime, long[] robotTime) {
        // Write your code here.
    }
}
Checking account…