题目:搜索旋转排序数组
class Solution:
TOTAL = 0
RUN = True
def search(self, nums: List[int], target: int) -> int:
# 将数组一分为二,分别比头尾,尾大于头为有序,剩下的为无序
i, j = 0, len(nums) - 1
题目:搜索旋转排序数组
class Solution:
TOTAL = 0
RUN = True
def search(self, nums: List[int], target: int) -> int:
# 将数组一分为二,分别比头尾,尾大于头为有序,剩下的为无序
i, j = 0, len(nums) - 1