Skip to content

Commit f5d5c18

Browse files
committed
commit
1 parent 1675728 commit f5d5c18

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class Solution {
2+
public int removeElement(int[] nums, int val) {
3+
int c = 0;
4+
for (int i = 0; i < nums.length; i++) {
5+
if (nums[i] != val) {
6+
nums[c] = nums[i];
7+
c++;
8+
9+
}
10+
}
11+
12+
return c;
13+
}
14+
}

Array/Remove Element/RemoveElement.md

Whitespace-only changes.

0 commit comments

Comments
 (0)