<awangdev>80.Remove Duplicates from Sorted Array II_1.java
public int removeDuplicates(int[] nums) {
        if (nums == null || nums.length == 0) {
            return 0;
        }
        
        int index = 1; 
        for (int i = 2; i < nums.length; i++) {
            if (nums[i] != nums[index] || (nums[i] == nums[index] && nums[i] != nums[index - 1])) {
                nums[++index] = nums[i];
            }
        }
        return index + 1; 
    }
public int sample_funcname ( int [ ] var_0 ) {
  if ( var_0 == null || var_0 . length == 0 ) {
    return 0 ;
  }
  int var_5 = 1 ;
  for ( int var_7 = 2 ;
  var_7 < var_0 . length ;
  var_7 ++ ) {
    if ( var_0 [ var_7 ] != var_0 [ var_5 ] || ( var_0 [ var_7 ] == var_0 [ var_5 ] && var_0 [ var_7 ] != var_0 [ var_5 - 1 ] ) ) {
      var_0 [ ++ var_5 ] = var_0 [ var_7 ] ;
    }
  }
  return var_5 + 1 ;
}
