摘要:
class Solution { public int minCut(String s) { int[] dp=new int[s.length()+1]; for(int i=0;i=0&&i+len=0&&i+len<s.length()&&s.charAt(i-1-len)==s.charAt(i+len);len++) ... 阅读全文
摘要:
class Solution { public List> partition(String s) { List> res=new ArrayList>(); generatePartition(0,new ArrayList(),res,s); return res; } private void generatePart... 阅读全文