13. Remove Duplicates from Sorted Array
Given an array nums sorted in non-decreasing order, remove duplicates in place so each element appears once, and return the new length.
उदाहरण 1:
इनपुट: nums = [1,1,2] आउटपुट: 2
उदाहरण 2:
इनपुट: nums = [0,0,1,1,1,2,2,3,3,4] आउटपुट: 5
सीमाएँ:
1 <= nums.length <= 3 * 10^4nums is sorted in non-decreasing order.