Longest Palindromic Substring
Difficulty: Medium
Category: DSA
Topics: Two Pointers, String, Dynamic Programming
Asked at: Amazon, Microsoft, Wayfair, Facebook, Adobe, eBay, Google, Oracle, Goldman Sachs, Yandex, Qualcomm
Given a string `s`, return _the longest_ _palindromic_ _substring_ in `s`.
**Example 1:**
**Input:** s = "babad"
**Output:** "bab"
**Explanation:** "aba" is also a valid answer.
```
**Example 2:**
**Input:** s = "cbbd"
**Output:** "bb"
```
**Constraints:**
- `1 <= s.length <= 1000`
- `s` consist of only digits and English letters.