Problem
You get a string s. Split s into one or more parts, so that each part is a palindrome. A palindrome is a string that reads the same from left to right and from right to left.
Return all the possible splits. Each split is a list of the parts, in the order that they have in s. You can return the splits in any order.
Example 1
- Input:
- s = "abba"
- Output:
- [["a","b","b","a"],["a","bb","a"],["abba"]]
Example 2
- Input:
- s = "xyz"
- Output:
- [["x","y","z"]]
- Explanation:
- Each single letter is a palindrome. No longer part of
xyzis a palindrome.
Example 3
- Input:
- s = "q"
- Output:
- [["q"]]
Constraints
- 1 <= s.length <= 16
- s contains only lowercase English letters.
SysRound wrote this statement. A reference solution checks every example.
Related questions
Continue with questions that share topics or the same question type.
- Generate Parentheses
Coding · Backtracking · Bracket Sequences · Dynamic Programming
- Word Break II
Coding · Array · Backtracking · Dynamic Programming
- Beautiful Arrangement
Coding · Array · Backtracking · Bit Manipulation
- Brace Expansion
Coding · Backtracking · Breadth-First Search · Sorting
Sources · 2 references
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 131. Palindrome Partitioning
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source
LeetCode company tags · 1 record
Salesforce
Palindrome Partitioning
Reported date not specified · Source window: 6mo
Source snapshot: Oct 20, 2026
Source frequency score: 55.3. This is not an interview probability.
View source