Python3 O(n) || O(1) # Runtime: 63ms 60.00% Memory: 14.9mb 93.48%
\nclass Solution:\n    def distanceBetweenBusStops(self, distance: List[int], start: int, destination: int) -> int:\n#         O(n) || O(1)\n# Runtime: 63ms 60.
```\nclass Solution:\n    def distanceBetweenBusStops(self, distance: List[int], start: int, destination: int) -> int:\n#         O(n) || O(1)\n# Runtime: 63ms 60.00% Memory: 14.9mb 93.48%\n        clockWiseDirection = 0\n        totalSum = 0\n\n        for idx, val in enumerate(distance):\n            if start < destination and (idx >= start and idx < destination ):\n                clockWiseDirection += val\n\n            if start > destination and (idx >= start or idx < destination ):\n                clockWiseDirection += val\n\n            totalSum += val\n\n        return min(clockWiseDirection, totalSum-clockWiseDirection)\n```
['Python', 'Python3']