// Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. // The order of the elements may be changed. Then return the number of elements in nums which are not ...
// What it is doing is essentially whenever we find a valid element, we put it in the front, and i is also used to track the number of valid elements. // How do we know when we overwrite element at ...