131. Palindrome Partitioning
class Solution:
def partition(self, s: str) -> List[List[str]]:
def checkPalindrome(word):
return word == word[::-1]
ans = []
def backtrack(index, prev, temp):
nonlocal ans
if index >= ...
tapanrachchh.hashnode.dev1 min read