Given a string s, return the longest palindromic substring in s.
Input: s = "babad"
Output: "bab"
Explanation: "aba" is also valid; either is acceptable depending on implementation.
Input: s = "cbbd"
Output: "bb"
Print only the final output (a substring) so it can be compared with the expected result.
No submissions yet.
Share approaches (expand-around-center, DP, Manacher), compare runtimes, and discuss edge cases.