Redirecting to
NADOS

Shortest Palindrome

1. You are given string(str). 
2. You can convert the given string to a palindrome by adding some characters in front of it.
3. You have to find the shortest palindromic string formed after performing the above-mentioned transformation.
Input Format
A string
Output Format
A string
Question Video
Constraints
1 <= length of the string <= 10^4
Sample Input
coding
Sample Output
gnidocoding


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name