摘要: ```C++ class Solution { public: int rec(vector& nums, int left, int right, int target){ int mid = (left + right)/2; if(left == right || right-left == 1){ if(nums[left]=... 阅读全文
posted @ 2018-08-10 18:40 一条图图犬 阅读(212) 评论(0) 推荐(0) 编辑
摘要: ```python3 class Solution: def intersection(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: List[int] """ s = [] ... 阅读全文
posted @ 2018-08-10 18:12 一条图图犬 阅读(204) 评论(0) 推荐(0) 编辑
摘要: ```C++ class Solution { public: int peakIndexInMountainArray(vector& A) { int res=0; for(int i=0;i A[res]){ res=i; } } return res; }... 阅读全文
posted @ 2018-08-10 17:40 一条图图犬 阅读(380) 评论(0) 推荐(0) 编辑
摘要: ```C++ class Solution { public: bool checkPossibility(vector& nums) { if(nums.empty()){ return false; } if(nums.size() == 1){ return true; } int p = 0 阅读全文
posted @ 2018-08-10 10:57 一条图图犬 阅读(414) 评论(0) 推荐(0) 编辑