Company: Coderbyte
Difficulty: medium
Gas Station Circular Route body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; } .problem-container { max-width: 900px; margin: auto; padding: 20px; border: 1px solid #ddd; border-radius: 8px; background: #f9f9f9; } h1, h3 { color: #333; } pre { background: #f4f4f4; padding: 10px; border: 1px solid #ddd; border-radius: 5px; overflow-x: auto; } ul { margin: 0; padding-left: 20px; } .example { margin-top: 20px; } .example .input, .example .output { margin-bottom: 10px; } Array Challenge - Gas Station Circular Route Have the function ArrayChallenge(strArr) take strArr , which will be an array consisting of the following elements: N : The number of gas stations in a circular route. Each subsequent element will represent the amount of gas g at a gas station and the amount c required to get to the next station (formatted as \"g:c\"). Your goal is to return the index of the starting gas station that will allow you to travel around the entire route once. If it is not possibl