[Solved] Remove Element – 27 C++, Java, Python – Microsoft, Google , Amazon, Media.net
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 equal to val. Consider the number of elements in nums which are not equal to val be k, to get…