Search
⌘K

Leetcode 1616. Split Two Strings to Make Palindrome

Given two equal-length strings a and b, determine whether there exists a split index such that a_prefix + b_suffix or b_prefix + a_suffix is a palindrome. The core challenge is efficiently matching characters from opposite ends across the two strings (a two-pointer cross-check) and verifying the remaining middle segment is a palindrome.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.