Practice Palindrome Partitioning
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.
Source: Palindrome Partitioning on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
s = "aab"
Output
[["a","a","b"],["aa","b"]]
# Example 2
Input
s = "a"
Output
[["a"]]
Constraints
1 <= s.length <= 16
s contains only lowercase English letters.
Related LeetCode Problems
Practice more problems similar to Palindrome Partitioning.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.