3-Blast Palindrome
You are given a string $S$ of length $N$. Your task is to convert the string into a **non-empty** [palindrome](https://en.wikipedia.org/wiki/Palindrome#Characters,_words,_or_lines) using the following operation any (possibly zero) number of times: - Choose an index $1\lt i\lt |S|$, where $|S|$ denotes the current length of string; - Remove the characters at indices $(i-1)$, $i$, and $(i+1)$ from
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.
Sign in to chat with the tutor and save your progress.
Sign in to start