摘要:
第一次提交,两个测试用例都通过了,最后提交结果显示为【超出时间限制】,不通过的测试用例为 nums = [1,1] 于是,改 加了 if 判断语句 但还是提交结果显示【超出时间限制】,不通过的测试用例为 nums = [1,2,2] 卒!!!!!! class Solution { public i 阅读全文
摘要:
左闭右闭区间:(另一种为左闭右开区间) 注意middle的取值 class Solution { public int search(int[] nums, int target) { //首先关于(left + rigth)/2 取舍问题:int类型数据作除法会舍去小数部分 int left = 阅读全文