Find the minimum total time to process all queries on a ring of drone nodes.
Unlock detailed company stats for this questionUpgrade
A company is expanding its drone delivery network, which has m nodes arranged in a ring (1-based indexing). Drone i can move to either adjacent neighbour in flyTime[i] time. Another integer array QueryList of size n is given. Starting from node 1, find the minimum total time required to process all the queries in QueryList. Example: m = 3, flyTime = [3,2,1], n = 4, QueryList = [1,3,3,2]; output is 4 seconds. The solution needs to run in linear time (circular array manipulation plus prefix sum).
Format · Online assessment.
Community answers
No answers contributed by the community yet.
Related questions
Rotting Oranges: find the minimum time for all fresh oranges to rot.Find the minimum total request processing time for a conveyor belt and storage system.Find the minimum seconds to schedule all processes across halving processors.Related courses

Course

Course
Course
