Arrays.binarySearch方法
摘要:Arrays.binarySearch(int[] arr,int b) 1,数组arr必须排序后调用查找b在arr数组中的下标是多少。 2,存在:返回在数组中的下标 不存在:返回插入点的负值减一 3,特殊: 返回0,数组中最小的值 返回-1,比数组中所有值都小 大于0:存在 小于0:不存在
阅读全文
posted @ 2021-11-25 13:30
posted @ 2021-11-25 13:30
posted @ 2021-11-25 09:52
posted @ 2021-11-11 14:43