Problem can be found in here!
def removeDuplicates(nums: List[int]) -> int:
slow, fast = 0, 1
while fast < len(nums):
if nums[fast] != nums[slow]:
slow += 1
nums[slow] = nums[fast]
fast += 1
return slow + 1
Explanation: We use a fast pointer to find the next unique value. Then, we switch the value between slow+1 and fast.