public void sort(int[] nums){ int len = nums.length; int first = 0; int last = len; int mid = 0; while(mid<last){ if(nums[mid]<0){ if (mid==first){
mid++;
first++; continue;
} int i = mid; int tmp = nums[mid]; while(i>first){
nums[i]= nums[i-1];
i--;
}
nums[first] = tmp;
first++;
} else if(nums[mid]>0){ int i = mid; int tmp = nums[mid]; while(i<len-1){
nums[i] = nums[i+1];
i++;
}
nums[len-1]=tmp;
last--;
} else{
mid++;
}
}
}