分割回文串

LeetCode Hot 100 回溯
难度: 中等

题目描述

将字符串分割为多个子串,使每个子串都是回文。

解题思路

使用回溯法,递归尝试分割点并检查子串是否为回文。时间复杂度为 O(n*2^n)。