Find all palindromes in a string.
This problem asks you to find all palindromic substrings in a string. A common and reliable approach is center expansion: treat each character and each gap between characters as a potential palindrome center, then expand outward to collect every symmetric substring. This handles both odd-length and even-length palindromes naturally. Depending on the required output, you may need to return the substrings themselves, their indices, or just the count.