← ALL NOTES
Two Pointers

5. Longest Palindromic Substring

Every palindrome is symmetric around a center. There are 2n−1 of them: n centered on a character (odd length) and n−1 centered between two (even length). Sit on a center, push outward while the…

Loading…