/**
* @Description 返回目标数字在有序数组中的位置(假设有序数组中不存在重复数字)
* @param source
* @param target
* @return
*/
public static Integer numIndex(int[] source, int target) {
int index = 0;
if (source == null || source.length == 0) {
return 0;
}
while (++index < source.length && target > source[index])
;
return index;
}