摘要:
给定一个9*9的二维数组,求里面的数字要求横排9个、竖排9个,3*3的各自组成的9个,都组成不重复的数字。Input:[ ["5","3",".",".","7",".",".",".","."], ["6",".",".","1","9","5",".",".&quo 阅读全文
摘要:
给定一个升序排列的数组,以及一个整数,查找这个整数在数组中出现的起始、终止下标。没找到就返回 [-1,-1]。要求O(logn)时间复杂度。 Input: nums = [5,7,7,8,8,10], target = 8Output: [3,4] 思路: 运用二分查找,当找到与目标相等的下标时, 阅读全文