162. 尋找峯值/C++

int findPeakElement(vector<int>& nums) { if(nums.empty()) return -1; int n = nums.size(); int left = 0,right = n-1,mid; while(left<=right){ mid = left + (right-left)/2;
相關文章
相關標籤/搜索