会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xpp
CnBlogs
Home
New Post
Contact
Admin
Subscription
上一页
1
2
3
4
5
6
7
···
11
下一页
2017年4月30日
Longest Valid Parentheses
方法:在栈中直接记录字符串的下标更加方便
Read More
posted @ 2017-04-30 09:50 chengcy
Views(90)
Comments(0)
Diggs(0)
2017年4月26日
Valid Parentheses
方法:直接使用栈的数据结构对相关字符处理即可
Read More
posted @ 2017-04-26 08:41 chengcy
Views(101)
Comments(0)
Diggs(0)
2017年4月25日
Length of Last Word
方法:最简单的是从后向前遍历即可
Read More
posted @ 2017-04-25 21:51 chengcy
Views(95)
Comments(0)
Diggs(0)
Simplify Path
方法:这里实际只需要处理".."和对应的字符
Read More
posted @ 2017-04-25 20:55 chengcy
Views(125)
Comments(0)
Diggs(0)
2017年4月23日
Valid Anagram
Valid Anagram:注意所有字符都需要利用到
Read More
posted @ 2017-04-23 16:46 chengcy
Views(86)
Comments(0)
Diggs(0)
Count and Say
class Solution { public: string countAndSay(int n) { string ret = "1"; for(int i=1; i<n; ++i) ret = generateNext(ret); return ret; } string genera...
Read More
posted @ 2017-04-23 12:25 chengcy
Views(99)
Comments(0)
Diggs(0)
Integer to Roman/Roman to Integer
方法:注意罗马数字的分布即可 Roman to Integer规则:
Read More
posted @ 2017-04-23 11:46 chengcy
Views(184)
Comments(0)
Diggs(0)
Longest Common Prefix
方法:最每一个子串分别遍历,取最长子串
Read More
posted @ 2017-04-23 10:44 chengcy
Views(95)
Comments(0)
Diggs(0)
2017年4月22日
Longest Palindromic Subsequence
方法:与substring的不同是这里不需要子串连续 或者
Read More
posted @ 2017-04-22 22:57 chengcy
Views(200)
Comments(0)
Diggs(0)
Longest Palindrome
class Solution { public: int longestPalindrome(string s) { unordered_map hashTable; for(int i=0; i::iterator iter; bool flag = false; for(iter = hashTable.begin();...
Read More
posted @ 2017-04-22 21:19 chengcy
Views(95)
Comments(0)
Diggs(0)
上一页
1
2
3
4
5
6
7
···
11
下一页
公告