Route distance calculation in Kotlin
kotlin\nclass Solution {\n    fun distanceBetweenBusStops(distance: IntArray, start: Int, destination: Int): Int {\n        val totalDistance = distance.sum()\n
```kotlin\nclass Solution {\n    fun distanceBetweenBusStops(distance: IntArray, start: Int, destination: Int): Int {\n        val totalDistance = distance.sum()\n       \n        val routeDistance =\n            if (start < destination)\n                distance.drop(start).take(destination - start).sum()\n            else distance.drop(destination).take(start - destination).sum()\n\n        return minOf(routeDistance, totalDistance - routeDistance)\n    }\n}\n```
['Kotlin']