Mental Model
We want to split a string into parts where each part reads the same forwards and backwards. We try all splits step by step and keep only the ones that work.
Analogy: Imagine cutting a ribbon into pieces where each piece is a perfect mirror image of itself. You try cutting at different points and keep the cuts that make all pieces symmetrical.
s = "a b a c" Indices: 0 1 2 3 Partitions: ["a", "b", "a", "c"] or ["aba", "c"] We explore cuts between letters: a | b | a | c ↑ ↑ ↑ ↑ Try cuts at each ↑ to check palindrome parts.
