会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Asurudo Jyo の 倉 庫
手握红莲,青息不偃
首页
新随笔
联系
订阅
管理
上一页
1
···
32
33
34
35
36
37
38
39
40
···
47
下一页
2018年10月23日
Leetcode-926 Flip String to Monotone Increasing(将字符串翻转到单调递增)
摘要: 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
阅读(319)
评论(0)
推荐(0)
2018年10月18日
Leetcode-290 Word Pattern(单词模式)
摘要: 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
阅读(146)
评论(0)
推荐(0)
Leetcode-135 Candy(分发糖果)
摘要: 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
阅读(153)
评论(0)
推荐(0)
2018年10月16日
Leetcode-924 Minimize Malware Spread(尽量减少恶意软件的传播)
摘要: 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
阅读(504)
评论(0)
推荐(0)
Leetcode-923 3Sum With Multiplicity(三数之和的多种可能)
摘要: 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
阅读(346)
评论(0)
推荐(0)
Leetcode-921 Minimum Add to Make Parentheses Valid(使括号有效的最少添加)
摘要: 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
阅读(129)
评论(0)
推荐(0)
Leetcode-922 Sort Array By Parity II(按奇偶排序数组 II)
摘要: 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
阅读(168)
评论(0)
推荐(0)
2018年10月11日
Leetcode-827 Making A Large Island(最大人工岛)
摘要: 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
阅读(284)
评论(0)
推荐(0)
Leetcode-766 Toeplitz Matrix(托普利茨矩阵)
摘要: 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
阅读(179)
评论(0)
推荐(0)
2018年10月9日
Leetcode-919 Complete Binary Tree Inserter(完全二叉树插入器)
摘要: 哔了狗,一直忘记vector开辟空间以后会把所有元素的地址进行变动,然后疯狂debug
阅读全文
posted @ 2018-10-09 22:26 Asurudo
阅读(378)
评论(0)
推荐(0)
上一页
1
···
32
33
34
35
36
37
38
39
40
···
47
下一页
公告