← All problemsSign in

Shortest Palindromic Superstring

A palindrome is a string that is identical to its reverse. For example, "aba", "abba", "a" and "aa" are palindromes, while "ab", "abb" and "xyz" are not. A string $X$ is called a substring of string $Y$ if it is possible to obtain $X$ by erasing some (possibly zero) characters from the beginning of $Y$ and some (possibly zero) from the end of $Y$ without changing the order of the remaining charac

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start