上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 21 下一页
摘要: 转:https://blog.csdn.net/zhouwy_sy/article/details/52993489 问题出在,OS X上有两个包都叫做libtool 这里我们需要的libtool应该这样安装 阅读全文
posted @ 2018-08-11 20:51 一条图图犬 阅读(212) 评论(0) 推荐(0) 编辑
摘要: ```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 一条图图犬 阅读(211) 评论(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 一条图图犬 阅读(379) 评论(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 一条图图犬 阅读(412) 评论(0) 推荐(0) 编辑
摘要: ```C++ class Solution { public: void siftdown(vector& nums, int e, int begin, int end){ int i = begin; int j = 2*begin + 1; while(j nums[j]){ j++; } if(e > ... 阅读全文
posted @ 2018-08-09 18:50 一条图图犬 阅读(195) 评论(0) 推荐(0) 编辑
摘要: ```C++ void siftdown(vector& nums, int e, int begin, int end){ int i = begin; int j = 2 begin + 1; while(j nums[j]){ j++; } if(e nums[j]){ break; } nu 阅读全文
posted @ 2018-08-09 16:52 一条图图犬 阅读(1095) 评论(0) 推荐(0) 编辑
摘要: ```python3 # 不是最优解,最优解应该用topK的思路 class Solution: def maximumProduct(self, nums): """ :type nums: List[int] :rtype: int """ nums.sort() res = [nums[-... 阅读全文
posted @ 2018-08-09 15:51 一条图图犬 阅读(397) 评论(0) 推荐(0) 编辑
摘要: ```C++ class Solution { public: int removeDuplicates(vector& nums) { if(nums.empty()){ return 0; } if(nums.size()==1){ return 1 ; } int left = 0; int 阅读全文
posted @ 2018-08-09 15:31 一条图图犬 阅读(286) 评论(0) 推荐(0) 编辑
摘要: ```C++ class Solution { public: int searchInsert(vector& nums, int target) { for(int i =0;i= target){ return i; } } return nums.size()-1; } ... 阅读全文
posted @ 2018-08-09 15:09 一条图图犬 阅读(301) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 21 下一页