Find longest palindromic substring
Company: Meta
Role: Machine Learning Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Onsite
Given a string `s`, return the **longest contiguous substring** of `s` that is a **palindrome**.
## Input
- A single string `s`.
## Output
- A string representing the longest palindromic substring (if multiple answers exist, return any one).
## Constraints
- `1 <= len(s) <= 2000` (or similar typical interview constraints)
- `s` contains ASCII letters/digits.
## Examples
- `s = "babad"` → `"bab"` (or `"aba"`)
- `s = "cbbd"` → `"bb"`
Quick Answer: This question evaluates knowledge of string algorithms and pattern recognition, focusing on identifying palindromic substrings and reasoning about time and space complexity for contiguous substring problems.