A bus route has n stops numbered from n distance where distance[i] represents the distance between stop i and stop n.
The bus can travel in either a clockwise or counterclockwise direction. Return the shortest distance between the given start and destination stops.
Constraints:
n
distance.length
start, destination
distance[i]
A bus route has n stops numbered from n distance where distance[i] represents the distance between stop i and stop n.
The bus can travel in either a clockwise or counterclockwise direction. Return the shortest distance between the given start and destination stops.
Constraints:
n
distance.length
start, destination
distance[i]