Remove Duplicates from Sorted ArrayEasyAcceptance Rate 51.5%Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length.ExamplesExample 1Inputnums = [1,1,2]Output2Constraints0 <= nums.length <= 3 * 10^4-100 <= nums[i] <= 100nums is sorted in non-decreasing order.