Java 快排
class Solution {
public void reOrderArray(int [] nums) {
if(nums==null||nums.length==0) return ;
int l=0,r=nums.length-1;
while(l<r){
while(l<r&&nums[l]%2==1) l++;
while(l<r&&nums[r]%2==0) r--;
if(l<r){
swap(nums,l,r);
}
}
}
private void swap(int []nums,int i,int j){
int temp=nums[i];
nums[i]=nums[j];
nums[j]=temp;
}
}