【Leetcode】131. Split palindrome string

1. Title

1. Topic description

Given a string s, please ssplit it into substrings so that each substring is a palindrome string . Returns sall possible splits.

A palindrome string is a string that reads the same upright and backwards.

Example 1:

Input: s = "aab"
Output: [["a","a","b"],["aa","b"]]

Example 2:

Input: s = "a"
Output: [["a"]]

Tips :

  • 1 <= s.length <= 16
  • sConsists of only lowercase English letters

2. Basic framework

class Solution {
   
    
    
public:
    vector<vector<string

Guess you like

Origin blog.csdn.net/u011386173/article/details/132612381