题目链接:https://leetcode-cn.com/problems/palindrome-partitioning-ii/description/ 参考链接:https://blog.csdn.net/jingsuwen1/article/details/51934277 dp[i]存放[0,i)即以前i个字符串的子串的最小切割数,则所求为dp[s.length()]; 前0个字符串和1个字符串不需要切割,所以dp[0]=0,dp[1]=0: 1.初始化:当字串s.substring(0…