• + 0 comments

    it is nevertheless a not very generalizable problem and thats why in this case, brute force seems a good alternative. There are not inputs whose solutions are: there is no way of making this circle. Thus, when you assess if each pump has the petrol equivalent to the distance to the next pump, it is just about picking the smaller.