• + 1 comment

    Insanely broken exercise. Terrible test cases where every test has 1000 or more elements making it impossible to learn anything from the failure and it does not actually expect you to do a tour of the circle. In fact, if you try to you will fail. All the successful solutions only go clockwise and don't try to reach all the petrol pumps, they just go to the end of the array. It's shocking that this made it into the 1-week prep course and implies the rest of the HackerRank exercise library is even worse.