Skip to main content
All Questions

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 courses

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

System Design Interviews

Learn how to answer the latest system design questions across product, infrastructure, and AI domains. Features in-depth video examples, written breakdowns, and helpful reference patterns. Watch senior engineers and managers answer these questions in mock interview videos.