027.Remove Element Posted on 2017-09-13 | In LeetCode Test cases123456[3,2,2,3][3,3,3,3][3,2,3,3][3,2,1,0][1,2,2,3][1,2,3,4] Solution 1: AcceptedThis is an easy one. 12345678910public int removeElement(int[] nums, int val) { int count = 0; for(int i = 0; i < nums.length; i++) { if (nums[i] != val) { nums[count] = nums[i]; count++; } } return count;}