super clear  🐍 illustrated explanation
<-- please vote\n\n\n\n\n    def distanceBetweenBusStops(self, distance: List[int], start: int, destination: int) -> int:\n        """ O(N)TS """\n        s, (a
<-- please vote\n\n![image](https://assets.leetcode.com/users/images/457c4b50-cf9f-4e33-b5fb-140815b8df18_1651912563.7545173.png)\n\n\n    def distanceBetweenBusStops(self, distance: List[int], start: int, destination: int) -> int:\n        """ O(N)TS """\n        s, (a, b) = sum(distance), sorted((start, destination))\n        return min(ab := sum(distance[a:b]), s - ab)
[]