Skip to content

Commit 17f22d5

Browse files
committed
style: format code indent
1 parent 145a4f1 commit 17f22d5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

algorithms/remove-element.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
* @param {number} val
44
* @return {number}
55
*/
6-
var removeElement = function(nums, val) {
6+
var removeElement = function (nums, val) {
77
// 双指针 (快慢指针)
88
let slowIndex = 0;
99

1010
for (let fastIndex = 0; fastIndex < nums.length; fastIndex++) {
11-
if (val !== nums[fastIndex]) {
12-
nums[slowIndex++] = nums[fastIndex];
13-
}
11+
if (val !== nums[fastIndex]) {
12+
nums[slowIndex++] = nums[fastIndex];
13+
}
1414
}
1515

1616
return slowIndex;
17-
};
17+
};

0 commit comments

Comments
 (0)