Make a string a palindrome by adding the fewest characters to its front
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: hard
Interview Round: Other
Overview: Given a lowercase string of up to 50,000 characters, add characters only to its front to form the shortest possible palindrome. It tests reasoning about palindromic prefixes and linear-time string matching, plus careful handling of edge cases such as the empty string.