Remove ElementEasyAcceptance Rate 53.4%Given an array nums and a value val, remove all instances of that value in-place and return the new length.ExamplesExample 1Inputnums = [3,2,2,3], val = 3Output2Constraints0 <= nums.length <= 1000 <= nums[i] <= 500 <= val <= 100