给定一个字符串s,分割s使得s的每一个子串都是回文串 返回所有的回文分割结果。(注意:返回结果的顺序需要和输入字符串中的字母顺序一致。)
示例1
输入
"dde"
输出
[["d","d","e"],["dd","e"]]
加载中...
import java.util.*; public class Solution { /** * * @param s string字符串 * @return string字符串ArrayList
> */ public ArrayList
> partition (String s) { // write code here } }
class Solution { public: /** * * @param s string字符串 * @return string字符串vector
> */ vector
> partition(string s) { // write code here } };
# # # @param s string字符串 # @return string字符串二维数组 # class Solution: def partition(self , s ): # write code here
/** * * @param s string字符串 * @return string字符串二维数组 */ function partition( s ) { // write code here } module.exports = { partition : partition };
# # # @param s string字符串 # @return string字符串二维数组 # class Solution: def partition(self , s ): # write code here
package main /** * * @param s string字符串 * @return string字符串二维数组 */ func partition( s string ) [][]string { // write code here }
"dde"
[["d","d","e"],["dd","e"]]