Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.
(切分字符串,每个子串都是回文序列)
Example:

1. 回溯法
下面是一个标准的回溯法的模板:
1 | class Solution: |
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.
(切分字符串,每个子串都是回文序列)
Example:
下面是一个标准的回溯法的模板:
1 | class Solution: |