算法――二分查找算法(Java实现) (二)

2014-11-24 10:33:29 · 作者: · 浏览: 1
p(sortedData, findValue);

System.out.println("Loop:"+findValue+" found in pos "+pos+";count:"+bs.getlCount());
}
}

5、总结:这种查找方式的使用场合为已排序的数组。可以发现递归和循环的次数是一样的