Skip to content

Commit da5662a

Browse files
committed
Runtime: 80 ms (Top 76.14%) | Memory: 44.4 MB (Top 9.37%)
1 parent 661e9e5 commit da5662a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/F/Find the Middle Index in Array/Find the Middle Index in Array.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 80 ms (Top 76.14%) | Memory: 44.4 MB (Top 9.37%)
12
var findMiddleIndex = function(nums) {
23
for (let i = 0; i < nums.length; i++) {
34
let leftNums = nums.slice(0, i).reduce((a, b) => a + b, 0);
@@ -7,4 +8,4 @@ var findMiddleIndex = function(nums) {
78
}
89
}
910
return -1;
10-
};
11+
};

0 commit comments

Comments
 (0)