Java Easy Solution || O(n) || Beats 100% time complexity
Tricky moment of this problem is when start > destination.\nIn fact, we don\'t care about direction of bus movement - distance from 0 to 3 is the same as distan
Tricky moment of this problem is when `start` > `destination`.\nIn fact, we don\'t care about direction of bus movement - distance from 0 to 3 is the same as distance from 3 to 0.\nSo we can just pick `min(start, end)` as new start and  `max(start, end)` as new destination.\n\n```\nclass Solution {\n    public int distanceBetweenBusStops(int[] distance, int s, int d) {\n\t    // count total distance\n        int total = 0;\n        for (int dist : distance)\n            total += dist;\n        \n\t\t// get new start and dest and get distance between them\n        int nStart = Math.min(s, d), nDest = Math.max(s, d);\n        int dist = 0;\n        for (int i = nStart; i < nDest; i++)\n            dist += distance[i];\n        \n        return Math.min(dist, total - dist);\n    }\n}
['Array', 'Math', 'Java']