Remove Duplicates from Sorted Array — November 28, 2026
Given a sorted array nums, remove the duplicates inplace such that each unique element appears only once. The relative order of the elements should be kept the same.\n\n Do not allocate extra space for another array.\n Modify the input array nums inplace with O(1) extra memory.\n The function should