java | 0ms | easy
```\n/calculate total distance and clockwise distance. Subtract clockwise distance from total distance\nfor the Anti-clockwise distance and return min. /\nclass
```\n/*calculate total distance and clockwise distance. Subtract clockwise distance from total distance\nfor the Anti-clockwise distance and return min. */\nclass Solution {\n    public int distanceBetweenBusStops(int[] distance, int start, int destination) {\n        int total_dist=0;\n        int clockwise=0;\n        \n        for(int i=0;i<distance.length;i++){\n            total_dist+=distance[i];\n        }\n        \n        if(start> destination){\n            int tmp=start;\n            start=destination;\n            destination= tmp;\n        }\n        for(int i=start; i< destination;i++){\n            clockwise+=distance[i];\n        }\n        \n        return Math.min(clockwise, total_dist-clockwise);\n    }\n}
['Java']