'''

public class Solution {

public int removeDuplicates(int[] nums) {

int i=0,j=0;

while(i<nums.length-1){

if(nums[i]==nums[i+1]){

i++;

}else if(nums[i]!=nums[i+1]&&nums[j]==nums[i+1]){

i++;

}else if(nums[i]!=nums[i+1]&&nums[j]!=nums[i+1]){

j=j+1;

nums[j]=nums[i+1];

}

}

return j+1;

}

}

'''