Back
Longest Palindromic Substring
Given a string s, return the longest palindromic substring in s.
Java
Description
Solution
My Code
Longest Palindromic Substring
Given a string s, return the longest palindromic substring in s.
Example 1:
Input:
"babad"
Output:
"bab"
Viz
Tests
Run
Input
babad
cbbd
Custom
"babad"
arr =
"babad"
Expand around each center
b
a
b
a
d
b
T
F
F
F
F
a
F
T
F
F
F
b
F
F
T
F
F
a
F
F
F
T
F
d
F
F
F
F
T
Variables
No variables to display
Depth
Function Call
Stack empty
0/8
0.5x
1x
2x
4x