Skip to content

Commit 59e4d08

Browse files
authored
Update gas_station.py
1 parent 4bc83ba commit 59e4d08

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

data_structures/arrays/gas_station.py

+6
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ def can_complete_circuit(self, gas: list[int], cost: list[int]) -> int:
2929

3030
solution = Solution()
3131
print(solution.can_complete_circuit(gas, cost)) # Output: 3
32+
33+
# Example 2:
34+
gas = [2, 3, 4]
35+
cost = [3, 4, 3]
36+
37+
print(solution.canCompleteCircuit(gas, cost)) # Output: -1

0 commit comments

Comments
 (0)