Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The relative order of the elements may be changed. Since it is impossible to change the length of the ...
Given an integer array nums and an integer val, remove all occurrences of val in-place and return the new length of the array. Remove all instances of a given value (val) from the array nums in-place.