Logo
IconChallenge
Icon
IconProblem
IconSolutions
IconSubmissions

Palindrome Partitioning

XPChallenge Points: 20
levelLevel: Medium

You are given a string s.
Your task is to split s into all possible combinations where every substring in the partition is a palindrome (reads the same backward as forward).
Return a list of all valid palindrome partitions of s.
Each partition should be represented as a list of strings.

Example 1:

Input: s = "aba"

Output: [["a","b","a"], ["aba"]]

Example 2:

Input: s = "nitin"

Output: [["n","i","t","i","n"],["n","iti","n"],["nitin"]]

to Continue
like
dislike

Accepted:

Submission:

IconReport an issue
Icon
IconCode
IconYou need toto run or submitYou need toto run or submit
IconTest Case
IconTest Result