Mental Model
We try to split a string into parts where each part reads the same forwards and backwards. We explore all ways to do this by trying every possible cut and going back if it doesn't work.
Analogy: Imagine cutting a ribbon into pieces where each piece is a perfect mirror image of itself. You try one cut, check if the piece is a palindrome, then try the next cut. If a cut doesn't lead to a full solution, you undo it and try another.
s = "a b a b c" Indices: 0 1 2 3 4 Partitions: [a] [b] [a] [b] [c] Each [] is a palindrome piece Backtracking tries cuts at each index to find all palindrome groups
