public class Solution {

    public int removeElement(int[] nums, int val) {

        int lenCount = 0;

        for (int i = 0; i < nums.length; i++) {

            if (nums[i] != val) {
                nums[lenCount] = nums[i];
                lenCount++;
            }

        }

        return lenCount;

    }

}

Create : 27 Remove Element
Create : 27 Remove Element
