Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Longest Palindromic Substring
Medium
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Given a string s, return the longest palindromic substring in s.
Sample Input:
"babad"
Sample Output:
"bab"
Hints
Hint 1
Expand around center for each possible center
Hint 2
Handle both odd and even length palindromes
Hint 3
Track the longest palindrome found
Code Editor
Reset
Run
Save
Loading...