Skip to content

Commit 1aa5cfa

Browse files
Update LeetcodeProblems/Algorithms/GasStation/index.js
1 parent 89f0d89 commit 1aa5cfa

File tree

1 file changed

+1
-1
lines changed
  • LeetcodeProblems/Algorithms/GasStation

1 file changed

+1
-1
lines changed

LeetcodeProblems/Algorithms/GasStation/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var canCompleteCircuit = function(gas, cost) {
3434
return -1;
3535
else {
3636
gasSum = costSum = 0;
37-
for (var i = 0; i < len; ++i) {
37+
for (i = 0; i < len; ++i) {
3838
gasSum += gas[i];
3939
costSum += cost[i];
4040
if (costSum > gasSum) {

0 commit comments

Comments
 (0)