Skip to main content

Palindrome Partitioning

Given a string s, partition s such that every substring is a palindrome Return all possible palindrome partitioning of s Example: s = "aab" => [["a","a","b"],["aa","b"]]

Cut where the prefix already mirrors, then recurse on what is left. I undo each cut before sliding it right.

Meet Coco

Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Sign in free to type with Coco, up to a daily limit, and to talk with her for one hour. After that, talking comes with the $79 pack. Anyone can open the editor and run their code.

1Find All Palindrome Partitionsmedium
Based onLeetCode

Get a note when something new lands

New company guides, new problems and big changes to Coco. Rare, and you can leave any time. By joining you agree to get these emails.