Skip to content

Commit 0c07ff6

Browse files
refactor 27
1 parent 18f3d04 commit 0c07ff6

File tree

1 file changed

+1
-15
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+1
-15
lines changed
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**27. Remove Element
4-
5-
Given an array and a value, remove all instances of that value in place and return the new length.
6-
7-
Do not allocate extra space for another array, you must do this in place with constant memory.
8-
9-
The order of elements can be changed. It doesn't matter what you leave beyond the new length.
10-
11-
Example:
12-
Given input array nums = [3,2,2,3], val = 3
13-
14-
Your function should return length = 2, with the first two elements of nums being 2.
15-
*/
16-
173
public class _27 {
184

195
public static class Solution1 {
@@ -27,4 +13,4 @@ public int removeElement(int[] nums, int val) {
2713
return i;
2814
}
2915
}
30-
}
16+
}

0 commit comments

Comments
 (0)