Skip to main content
mediumBlind 75

Longest Palindromic Substring

Given a string, find the longest palindromic substring A palindrome reads the same forward and backward Example: "babad" => "bab" or "aba"

There are 2n-1 centers in a string. I expand outward from each one and keep the longest mirror that holds.

StringTwo PointersDynamic Programming

Meet Coco

Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.

1Find Longest Palindromic Substringmedium
Based onLeetCode