上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 47 下一页
摘要: 1 class Solution 2 { 3 public://saeed ssaaedd 4 bool isLongPressedName(string name, string typed) 5 { 6 int typedEnd = 0; 7 for(int i = 0;i = typed.... 阅读全文
posted @ 2018-10-23 18:32 Asurudo 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 public: 4 int minFlipsMonoIncr(string S) 5 { 6 vector left2CountOne (S.size(),0); 7 vector right2CountZero (S.size(),0); 8 ... 阅读全文
posted @ 2018-10-23 18:20 Asurudo 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 public: 4 int getWordEnd; 5 string getWord(string str) 6 { 7 string tmp; 8 int i; 9 for(i = getWordEnd;... 阅读全文
posted @ 2018-10-18 11:36 Asurudo 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 public: 4 int candy(vector& ratings) 5 { 6 int result = 0; 7 vector v1 (ratings.size(),1); 8 vector v2 (ratings.... 阅读全文
posted @ 2018-10-18 11:07 Asurudo 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 private: 4 int visited[309]; 5 int nowKilled; 6 int numOfNode; 7 int toBeDeleted; 8 public: 9 void DFS(int killer,vecto... 阅读全文
posted @ 2018-10-16 21:21 Asurudo 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 private: 4 int hashList[102]; 5 public: 6 long long int get(long long int n,long long int m) 7 { 8 if(m==1) 9 ... 阅读全文
posted @ 2018-10-16 19:21 Asurudo 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 public: 4 int minAddToMakeValid(string S) 5 { 6 stack s; 7 int result = 0; 8 for(auto c:S) 9 { 10 ... 阅读全文
posted @ 2018-10-16 18:38 Asurudo 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 public: 4 vector sortArrayByParityII(vector& A) 5 { 6 stack oddList; 7 stack evenList; 8 9 for(aut... 阅读全文
posted @ 2018-10-16 18:31 Asurudo 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1 int x[] = {1,-1,0,0}; 2 int y[] = {0,0,1,-1}; 3 4 class Solution 5 { 6 private: 7 int acreList[1500]; 8 int acreListEnd; 9 int Maxresult; 10 ... 阅读全文
posted @ 2018-10-11 12:11 Asurudo 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 public: 4 bool isToeplitzMatrix(vector>& matrix) 5 { 6 bool result = true; 7 for(int i = matrix.size()-1;i >= 0;i --) 8 ... 阅读全文
posted @ 2018-10-11 10:34 Asurudo 阅读(173) 评论(0) 推荐(0) 编辑
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 47 下一页