摘要: /* 有序的数组,二分搜索一个数,如果存在,返回其索引,否则返回 -1 */ int nums[]=new int[]{1,2,3,4,5,6,7,8}; Scanner sc=new Scanner(System.in); int target=sc.nextInt(); int left = 0 阅读全文
posted @ 2022-04-06 21:44 Eshiyi 阅读(136) 评论(0) 推荐(0)