插入排序思想
调整数组顺序使奇数位于偶数前面
http://www.nowcoder.com/questionTerminal/beb5aa231adc45b2a5dcc5b62c93f593
public class Solution { public void reOrderArray(int [] array) { for(int i=1;i<array.length;i++){ if(array[i]%2!=0){ int insertIndex=i; int insertValue=array[i]; while(insertIndex-1>=0&&array[insertIndex-1]%2==0){ array[insertIndex]=array[insertIndex-1]; insertIndex--; } array[insertIndex]=insertValue; } } } }