131. Palindrome Partitioning

Description

Given a string s, partition s such that every substring of the partition is a palindrome.

Return all possible palindrome partitioning of s.

Constraints

Approach

Examples

Input: "aab"

Output:

[

["aa", "b"],

["a", "a", "b"]

]

Solutions

Follow up

Last updated

Was this helpful?