leetcode 81搜索旋转排序数组2 C++

利用二分查找
1.左半部分增序,target在左边则进行二分查找。

2.右半部分增序,target在右边则进行二分查找。

class Solution {
   
public:
    bool search(vector<int>& nums, int target) {
   
        int start = 0, end 

你可能感兴趣的:(leetcode刷题记录,c++,leetcode)