← All problemsSign in

No Palindromes

CodeChefRating 2988Open on judge ↗

Alice has a string $S$ of length $N$, consisting of lowercase English letters. She wants to remove a lexicographically minimal subsequence$^{\dagger}$ $T$ from $S$ such that after removing $T$, the remaining characters of $S$ cannot be rearranged to form a [palindrome](https://en.wikipedia.org/wiki/Palindrome#Characters,_words,_or_lines). Your task is to help Alice by printing the subsequence $T$

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