本文主要是介绍LeetCode131:分割回文串,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
https://leetcode.com/problems/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:
Input: "aab"
Output:
[["aa","b"],["a","a","b"]
]
解题思路
深度优先搜索+回溯
https://leetcode-cn.com/pro
这篇关于LeetCode131:分割回文串的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!