【算法】二分查询

/** * 二分查询 * @author DUSTDAWN * n*(1/2)^x=1,时间复杂度x=log2 n */ public class Solution_1 { public static void main(String[] args) { int nums[] = {-1,0,3,9,5,12}; System.out.println(search(nums,3));
相关文章
相关标签/搜索