Leetcode solving: 1184. Distance Between Bus Stops

preview_player
Показать описание
A bus has n stops numbered from 0 to n - 1 that form a circle. We know the distance between all pairs of neighboring stops where distance[i] is the distance between the stops number i and (i + 1) % n.

The bus goes along both directions i.e. clockwise and counterclockwise.

Return the shortest distance between the given start and destination stops.

####################################
Please subscribe to my channel
My other Leetcode solving videos (easy)

Leetcode solving videos (Medium):

Leetcode solving videos (Hard):
Рекомендации по теме
join shbcf.ru