Skip to content

Latest commit

 

History

History
49 lines (25 loc) · 855 Bytes

File metadata and controls

49 lines (25 loc) · 855 Bytes

中文文档

Description

Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can find by performing this transformation.

Example 1:

Input: "aacecaaa"

Output: "aaacecaaa"

Example 2:

Input: "abcd"

Output: "dcbabcd"

Solutions

Python3

Java

...