Gas Station at Infosys
Medium47.5% acceptance
This problem has 75.0% frequency at Infosys.
Problem Description
There are `n` gas stations along a circular route, where the amount of gas at the `ith` station is `gas[i]`. You have a car with an unlimited gas tank and it costs `cost[i]` of gas to travel from the `ith` station to its next `(i + 1)th` station. You begin the journey with an empty tank at one of t...
Read full problem and hintsTopics
Also asked at 26 companies
More Infosys Questions
Two SumEasyLargest Number After Mutating SubstringMediumNext PermutationMediumMaximum SubarrayMediumFind Building Where Alice and Bob Can MeetHard
View all Infosys questions