上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 73 下一页
摘要: "题目" 这也是一道hard难度的题目吗? 很简单,维护一个数组就好了 class Solution { public: int firstMissingPositive(vector& nums) { int len = nums.size()+1; int a[len]; memset(a,0, 阅读全文
posted @ 2019-08-07 14:10 Shendu.CC 阅读(96) 评论(0) 推荐(0) 编辑
摘要: "题目" 阅读全文
posted @ 2019-08-07 13:39 Shendu.CC 阅读(93) 评论(0) 推荐(0) 编辑
摘要: "题目" 暴力搜索 阅读全文
posted @ 2019-08-05 19:09 Shendu.CC 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 前言 由于需要做一个快速匹配敏感关键词的服务,为了提供一个高效,准确,低能耗的关键词匹配服务,我进行了漫长的探索。这里把过程记录成系列博客,供大家参考。 在一开始,接收到快速敏感词匹配时,我就想到了 KMP 翻译过来叫“看毛片“的算法,因为大学的时候就学过它。听说到它的效率非常高。把原本字符串匹配效 阅读全文
posted @ 2019-08-05 14:36 Shendu.CC 阅读(6174) 评论(1) 推荐(4) 编辑
摘要: "题目" c++ class Solution { public: string a[31]; string countAndSay(int n) { a[1]="1"; for(int i=2;i 阅读全文
posted @ 2019-08-03 13:20 Shendu.CC 阅读(106) 评论(0) 推荐(0) 编辑
摘要: "题目" c++ DFS ,代码写的又臭又长,Faster than 85.33% class Solution { public: set a[10][10]; set e; int b[10][10]; int c[10][10]; int judge(int i,int j,int x) { 阅读全文
posted @ 2019-08-03 11:56 Shendu.CC 阅读(116) 评论(1) 推荐(0) 编辑
摘要: "题目" 阅读全文
posted @ 2019-07-25 11:46 Shendu.CC 阅读(65) 评论(0) 推荐(0) 编辑
摘要: "题目" class Solution { public: int tag[10]; bool isValidSudoku(vector & board) { for(int i=0;i 阅读全文
posted @ 2019-07-25 11:41 Shendu.CC 阅读(69) 评论(0) 推荐(0) 编辑
摘要: "题目" 二分练习 class Solution { public: vector searchRange(vector& nums, int target) { vector ans; if(nums.size()==0) { ans.push_back( 1); ans.push_back( 1 阅读全文
posted @ 2019-07-25 11:12 Shendu.CC 阅读(86) 评论(0) 推荐(0) 编辑
摘要: "题目" 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) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 73 下一页