NeetCode #172LC-214HardArrays & Hashing
← Back to All Problems

#172 · #214 · Shortest Palindrome(最短回文串)

📌 Problem Statement & Constraints

You are given a string s. You can convert it to a palindrome by adding characters in front of it. Return the shortest palindrome you can find this way. Constraints: 0 <= s.length <= 5 * 10^4.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!