#=================================== # Tanzila Islam # Email: tanzilamohita@gmail.com # Language: Python 3 #=================================== def removeDuplicates(self, nums: List[int]) -> int: count = 1 for i in range(1, len(nums)): if nums[i-1] != nums[i]: nums[count] = nums[i] count += 1 return count
No comments:
Post a Comment