Coding 1 - Shortest Palindrome

Problem: Shortest Palindrome

Given a string s, you may add characters only to the front of the string to make the whole string a palindrome.

Return the shortest palindrome you can obtai...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: