// uva 11584 Partitioning by Palindromes 线性dp
//
// 题目意思是将一个字符串划分成尽量少的回文串
//
// f[i]表示前i个字符能化成最少的回文串的数目
//
// f[i] = min(f[i],f[j-1] + 1(j到i是回文串))
//
// 这道题还是挺简单的,继续练
#include
#include
#include
#i...
分类:
其他好文 时间:
2015-06-03 23:37:32
阅读次数:
325
题目:Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representat...
分类:
其他好文 时间:
2015-06-03 15:33:00
阅读次数:
168
判断回文,简单的入栈出栈判断,其他的就是简单的回溯了。class Solution {private: vector> res; vector tempRes;public: bool isValid(string str) { stack stk; ...
分类:
其他好文 时间:
2015-06-02 21:26:50
阅读次数:
162
Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ...
分类:
编程语言 时间:
2015-06-01 22:02:43
阅读次数:
135
题目:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ...
分类:
其他好文 时间:
2015-06-01 20:16:51
阅读次数:
103
Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example,...
分类:
编程语言 时间:
2015-06-01 20:08:32
阅读次数:
138
Given a string s, partition s such that every substring of the partition is a palindrome.
Return the minimum cuts needed for a palindrome partitioning of s.
For example, given s = "aab",
Return...
分类:
其他好文 时间:
2015-05-27 17:29:29
阅读次数:
130
题目:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, ...
分类:
其他好文 时间:
2015-05-26 18:03:37
阅读次数:
129
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "aab",
Return
[
["aa","...
分类:
其他好文 时间:
2015-05-25 22:36:35
阅读次数:
123
We say a sequence of characters is a
palindrome if it is the same written
forwards and backwards. For exam-
ple, ‘
racecar
’ is a palindrome, but
‘
fastcar
’ is not.
A
partition
of a sequenc...
分类:
其他好文 时间:
2015-05-21 22:45:42
阅读次数:
229