publicclassSearch{publicstaticvoidmain(String[]args){intarr1[]={1,3,5,6,8,10,13,15,19,23};inti=23;System.out.println(binarySearch(arr1,i));}publicstaticintbinarySearch(inta[],intnum){intstart=0;intend=a.length-1;intm=(end+start)/2;while(start<...
查看全文