leetcode Remove Duplicates from Sorted Array python
class Solution(object):
def removeDuplicates(self,nums):
if len(nums) <= 0:
return 0
j=0
for i in range(0,len(nums)):
if nums[i] != nums[j]:
print'i j is ',i,j
nums[i],nums[j+1] = nums[j+1],nums[i]
j=j+1
return j+1