Palindrome Partitioning

Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.

Constraints

  • 1 <= s.length <= 16
  • s contains only lowercase English letters.
Saving… · 2 lines
class Solution:
def partition(self, s: str) -> List[List[str]]:
Console

Click Run to execute sample tests.