java solution ||0ms||100 % better than other java solns
This is the easiest and straight forward approach keeping in mind all condition that can occur .\n\n\nclass Solution {\n    public int distanceBetweenBusStops(i
***This is the easiest and straight forward approach keeping in mind all condition that can occur .***\n\n```\nclass Solution {\n    public int distanceBetweenBusStops(int[] distance, int start, int destination) {\n        int n = distance.length;\n        int clock=0;// clockwise  direction distance\n        int anti =0;// anticlockwise direction distance\n        if (start<destination){\n\n            for (int i=start;i<destination;i++){\n                clock+= distance[i];\n            }\n            for(int i=n-1;i>=destination;i--){\n                anti+= distance[i];\n            }\n            for (int i=0;i<start;i++){\n                anti+=distance[i];\n            }\n            return Math.min(clock,anti);\n            \n        }\n        else{\n            for (int i=destination;i<start;i++){\n                anti+= distance[i];\n            }\n            \n            for (int i=0;i<destination;i++){\n                clock+=distance[i];\n            }\n            for(int i=n-1;i>=start;i--){\n                clock+= distance[i];\n            }\n            \n            return Math.min(clock,anti);\n            \n        }\n    }\n}\n\n       \n\n```\n\n\n\n ![image](https://assets.leetcode.com/users/images/1e0de1e6-176e-4e89-8958-71aa6c5e75eb_1656787180.887758.jpeg)
[]