string库函数
文章平均质量分 59
zhaobaoxue
这个作者很懒,什么都没留下…
展开
-
Palindrome Partitioning II
DP.先利用DP计算每个substr是否原创 2014-09-09 11:44:52 · 306 阅读 · 0 评论 -
Substring with Concatenation of All Words
check each possible position i to see if the substring start at position i is a原创 2014-09-10 18:01:19 · 328 阅读 · 0 评论 -
suffix tree pattern matching
// A simple C++ implementation of substring search using trie of suffixes#include #include #define MAX_CHAR 256using namespace std;// A Suffix Trie (A Trie of all suffixes) Nodeclass SuffixTrie原创 2014-09-28 16:14:18 · 509 阅读 · 0 评论 -
uva 10716 - Minimum Swap to form Palindrome
转自: http://blog.csdn.net/chenguolinblog/article/details/7908609转载 2014-10-07 22:03:33 · 460 阅读 · 0 评论 -
longest substring with two unique charachters
O(n)双指针。code#include #include #include #include #include using namespace std;string longest(string str){ int longest = 0; int longest_start = -1; int occurance[256]; int count = 0原创 2014-10-14 18:27:46 · 430 阅读 · 0 评论