String
Current Substring
-
-

Start Index (i)

0

End Index (j)

0

Longest Palindrome

-

Length

0
Found Palindromes
None found yet
Click "Step" or "Play" to start the visualization
Current Window
Palindrome
Longest Found
Python Code - Brute Force
for i in range(len(s)):
    for j in range(i, len(s)):
        sub = s[i:j+1]
        if is_palindrome(sub):
            if len(sub) > len(longest):
                longest = sub
return longest