You are given two strings a and b of the same length.
Select an index and split both strings at the same position, dividing string a into two substrings a_prefix and a_suffix such that a is equal to a_prefix a_suffix, and dividing string b into two substrings b_prefix and b_suffix such that b is equal to b_prefix b_suffix. Either substring can be empty.
Return true if a_prefix b_suffix or b_prefix a_suffix forms a palindrome, or false otherwise.
Note: A string is a palindrome if it reads the same forward and backward.
Constraints:
a.length, b.length
a.length b.length
a and b consist of lowercase English letters.
You are given two strings a and b of the same length.
Select an index and split both strings at the same position, dividing string a into two substrings a_prefix and a_suffix such that a is equal to a_prefix a_suffix, and dividing string b into two substrings b_prefix and b_suffix such that b is equal to b_prefix b_suffix. Either substring can be empty.
Return true if a_prefix b_suffix or b_prefix a_suffix forms a palindrome, or false otherwise.
Note: A string is a palindrome if it reads the same forward and backward.
Constraints:
a.length, b.length
a.length b.length
a and b consist of lowercase English letters.