Valid Anagram:注意所有字符都需要利用到 Read More
posted @ 2017-04-23 16:46 chengcy Views(86) Comments(0) Diggs(0)
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)
方法:注意罗马数字的分布即可 Roman to Integer规则: Read More
posted @ 2017-04-23 11:46 chengcy Views(184) Comments(0) Diggs(0)
方法:最每一个子串分别遍历,取最长子串 Read More
posted @ 2017-04-23 10:44 chengcy Views(95) Comments(0) Diggs(0)