<awangdev>26.Remove Duplicates from Sorted Array_2.java
public int removeDuplicates(int[] nums) {
        if (nums == null) {
            return 0;
        }
        if (nums.length <= 1) {
            return nums.length;
        }
        int currPos = 0;
        int movingPos = 1;
        while (movingPos < nums.length) {
            while(movingPos < nums.length && nums[currPos] == nums[movingPos]) {
                movingPos++;
            }
            if (movingPos < nums.length && nums[currPos] != nums[movingPos]) {
                nums[currPos + 1] = nums[movingPos];
                currPos++;
                movingPos++;
            }
        }
        return currPos + 1;
    }
public int sample_funcname ( int [ ] var_0 ) {
  if ( var_0 == null ) {
    return 0 ;
  }
  if ( var_0 . length <= 1 ) {
    return var_0 . length ;
  }
  int var_5 = 0 ;
  int var_6 = 1 ;
  while ( var_6 < var_0 . length ) {
    while ( var_6 < var_0 . length && var_0 [ var_5 ] == var_0 [ var_6 ] ) {
      var_6 ++ ;
    }
    if ( var_6 < var_0 . length && var_0 [ var_5 ] != var_0 [ var_6 ] ) {
      var_0 [ var_5 + 1 ] = var_0 [ var_6 ] ;
      var_5 ++ ;
      var_6 ++ ;
    }
  }
  return var_5 + 1 ;
}
