二分查找思想(使用遞歸和不適用遞歸的思想)

public class BinarySearch { public static void main(String[] args) { int[] array = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; System.out.println(searchLoop(array, 101)); } /** * 循環二分查找,返回第一次出現該值的位置
相關文章
相關標籤/搜索