Shortest Palindrome
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.
Shortest Palindrome

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:
Input: {"s":"aacecaaa"}
Output: "aaacecaaa"
Input
arr ={"s":"aacecaaa"}

Reverse the string: "aaacecaa"

Input String

a

a

c

e

c

a

a

a

Reversed String

a

a

a

c

e

c

a

a

Input Length: 8
Variables
No variables to display
DepthFunction Call
Stack empty
0/3