Mental Model
Find the longest part of a string that reads the same forwards and backwards by checking around each character.
Analogy: Imagine looking for the biggest mirror in a hallway where the reflection looks exactly the same from both sides, starting from each spot and expanding outwards.
s = "b a b a d" indexes: 0 1 2 3 4 Check centers like: ↑ b a b a d Then expand left and right pointers to find palindromes.
