AO
Back

Drone Delivery Around a Circular Hub Route

Also reported as Drone Path Minimum Cost · Distance Between Bus Stops (LeetCode 1184) Variant

OAAsync OALast reported September 2026Medium Frequency

Problem Overview

The round: Amazon's online assessment pairs one traditional coding question with an AI-assisted debugging task in a code repository. Two reports put the coding question at 40 minutes. Nine candidates posted about this drone question between May and September 2026, among them SDE II applicants, new grads and a frontend applicant. Nobody posted the full prompt, so the statement below is pieced together from their descriptions. The function and parameter names are ours.

Problem

m hubs stand on a closed ring, numbered 1 to m. transitTime[i] (0-indexed) is the travel time between hub i + 1 and the next hub clockwise. The last entry, transitTime[m - 1], joins hub m back to hub 1. A drone starts at hub 1 and must visit the hubs in requestedHubs in the given order. Each leg can go clockwise or counter-clockwise. Return the minimum total travel time.

def minDeliveryTime(requestedHubs: list[int], transitTime: list[int]) -> int: ...

Example (ours; no report gives one)

transitTime   = [3, 1, 4, 1, 5]     # 1-2: 3, 2-3: 1, 3-4: 4, 4-5: 1, 5-1: 5
requestedHubs = [3, 5, 2]

1 -> 3   clockwise 3 + 1 = 4        counter-clockwise 5 + 1 + 4 = 10   -> 4
3 -> 5   clockwise 4 + 1 = 5        counter-clockwise 1 + 3 + 5 = 9    -> 5
5 -> 2   clockwise 5 + 3 = 8        counter-clockwise 1 + 4 + 1 = 6    -> 6

Output: 15

What the reports stress

  • The ring is closed. One candidate warns that the step from the last hub back to the first is where the trap is, and another repeats the warning: remember that the ends are joined.
  • One candidate scored 8 of 15 and says the case they missed was a ring with m = 2.
  • Nobody posted constraints. One candidate says nothing about the constraints needed special care.

How the page reads two details: most descriptions give the time as the distance between neighbouring hubs, so the page uses the same time in both directions; two posts word it as the cost of setting out from each hub, and one adds "remember, it is the leaving cost", which could mean the time depends on the direction. The reports describe the trip as visiting the requested hubs in order, with no return to hub 1. Confirm both on the day; the tests use these readings.

What Reports Emphasize

What candidates report: The ring is closed: one candidate singles out the step from the last hub back to the first as the trap, and another repeats the warning.; One new-grad candidate scored 8 of 15 and says the case they missed was a two-hub ring.; One candidate describes prefix sums over the ring, taking the shorter of the two directions for each leg; another compares it to LeetCode 1184 (Distance Between Bus Stops) asked once per leg.; One candidate found nothing in the constraints that needed special care.

Outcomes: The new grad who scored 8 of 15 was told they would move forward. A candidate replying in a frontend applicant's thread who passed half of this question's tests and all of the debugging task's was asked to schedule a phone interview right away.

Our note (not from the reports): The page reads each transit time as the same in both directions and ends the trip at the last requested hub, the majority description; two posts word the times as the cost of leaving a hub, so confirm both on the day.

Practice

Write your own against 6 test cases, or read the worked solution — approach, complexity, and code that runs.

Prepping for Amazon with friends?

Send them this page. It is free to read, no account needed.

More Amazon Questions

Free preview

Every question in the Amazon catalog gets this depth

What you just read — canonical solution, follow-up arc, what passing candidates actually did — exists for all 57 Amazon questions, refreshed monthly from new candidate reports.

$59/mo — or $50/mo with the 3-month pass · cancel anytime
Amazon · OA · Reported 9× across candidate reports
Is this helpful?