摘要: "题目" c++ 二分 class Solution { public: int search(vector& nums, int target) { if(nums.size()==0) return 1; int start=0; int end = nums.size() 1; int ans 阅读全文
posted @ 2019-07-22 20:05 Shendu.CC 阅读(103) 评论(0) 推荐(0) 编辑
摘要: "题目" c++ 解题思路,先用栈,模拟一下括号匹配,然后维护一个数字,能够进行括号匹配的都标上1 最后计算一下最长连续的1的区间长度就可以了。 class Solution { public: int a[100005]; char stack[100005]; int stack2[100005 阅读全文
posted @ 2019-07-22 14:06 Shendu.CC 阅读(75) 评论(0) 推荐(0) 编辑