Problem Description:
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...
分类:
其他好文 时间:
2014-09-11 21:00:32
阅读次数:
208
leetcode 经典题 Palindrome Partitioning 两种方法实现和错误规避。...
分类:
其他好文 时间:
2014-09-11 19:27:32
阅读次数:
152
/*
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","b"],
["a","a"...
分类:
其他好文 时间:
2014-09-10 12:33:50
阅读次数:
175
Palindrome Partitioning
Total Accepted: 18096 Total
Submissions: 69797My Submissions
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all...
分类:
其他好文 时间:
2014-09-09 18:29:29
阅读次数:
205
PalindromesA regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a pali....
分类:
其他好文 时间:
2014-09-04 00:01:57
阅读次数:
310
Scramble StringGiven a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible...
分类:
其他好文 时间:
2014-09-02 00:17:33
阅读次数:
260
LeetCode: Scramble StringGiven a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is o...
分类:
其他好文 时间:
2014-09-01 22:42:34
阅读次数:
308
题意 判断一个串最少可以分解为多少个对称串 一个串从左往后和从右往左是一样的 这个串就称为对沉串
令d[i]表示给定串的前i个字母至少可以分解为多少个对称串 那么对于j=1~i 若(i,j)是一个对称串 那么有 d[i]=min(d[i],d[j-1]+1) 然后就得到答案了
#include
#include
#include
using namespace std;...
分类:
其他好文 时间:
2014-08-25 17:11:44
阅读次数:
181
思想: 简单的深度优先搜索。
思想: 动态规划:
n = s.length();
Record[i] = 0 , ( i = n || is...
分类:
其他好文 时间:
2014-08-25 02:17:23
阅读次数:
187
Palindrome PartitioningGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioni...
分类:
其他好文 时间:
2014-08-23 21:34:11
阅读次数:
288