You are given a string s. You can convert s to a
palindrome
by adding characters in front of it.
Return the shortest palindrome you can find by performing this transformation.
*Example 1:
Example 2:
Constraints:
s consists of lowercase English letters only.
palindrome
by adding characters in front of it.
Return the shortest palindrome you can find by performing this transformation.
*Example 1:
Code:
Input: s = "aacecaaa" Output: "aaacecaaa"
Code:
Input: s = "abcd" Output: "dcbabcd"
Code:
0 <= s.length <= 5 * 104
Comment