← Intuit questions
CodingReported in a candidate post, Aug 2024

Longest palindromic substring for every prefix

Filed under Intuit

Given a string s of length n, return an array ans of length n where ans[i] is the length of the longest palindromic substring of the prefix s[0..i].

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Intuit questions

Collected from public candidate posts and coding forums. Updated Nov 2026.