c++ | 90% faster than all | easy
```\nclass Solution {\npublic:\nint distanceBetweenBusStops(vector& a, int s, int e) {\n\n    int count=0;\n    int temp=0;\n    if(s<=e){\n    for(int i=s;i<e;
```\nclass Solution {\npublic:\nint distanceBetweenBusStops(vector<int>& a, int s, int e) {\n\n    int count=0;\n    int temp=0;\n    if(s<=e){\n    for(int i=s;i<e;i++){\n        count+=a[i];\n    }\n    \n    for(int i=0;i<s;i++){\n        temp+=a[i];\n    }\n    for(int i=e;i<a.size();i++){\n        temp+=a[i];\n    }\n    return min(temp,count);\n    }\n    \n    for(int i=e;i<s;i++){\n        count+=a[i];\n    }\n    \n    for(int i=0;i<e;i++){\n        temp+=a[i];\n    }\n    for(int i=s;i<a.size();i++){ \n        temp+=a[i];\n    }\n    return min(temp,count);\n    \n}\n};
[]