Amazon logoAmazon
Coding·40 minMembers

Circular Array — Multi-Query Distance Accumulation

Members only

Bus-stops-on-a-ring variant of LC 1184: prefix-sum the ring once, then answer a stream of (a, b) queries by accumulating the shorter of the two arc distances.

SWE
array
prefix-sum
easy
Frequency
Single report
Last asked
2026-05-15
Stage
oa

Log in to continue reading the full content