[Java] 0ms beats 100% space and time.
\nclass Solution {\n    public int distanceBetweenBusStops(int[] distance, int start, int destination) {\n        int min1=0,min2=0;\n        int i=0,j=0;\n    
```\nclass Solution {\n    public int distanceBetweenBusStops(int[] distance, int start, int destination) {\n        int min1=0,min2=0;\n        int i=0,j=0;\n        if(start<destination){\n            i=start;\n            while(i<destination)\n                min1+=distance[i++];\n            j=destination;\n            while(j<distance.length)\n                min2+=distance[j++];\n            j=0;\n            while(j<start)\n                min2+=distance[j++];\n        }\n        else{\n            i=destination;\n            while(i<start)\n                min1+=distance[i++];\n            j=start;\n            while(j<distance.length)\n                min2+=distance[j++];\n            j=0;\n            while(j<destination)\n                min2+=distance[j++]; \n        }\n        return min1>min2?min2:min1;\n    }\n}\n```
[]