Count Palindromes
CodeChefOpen on judge ↗
You are given a string $S_1$. You create a new string $S_2$ by performing at most one operation. The operation involves changing an alphabet at any index to any other alphabet. Example: If $S_1=aba$ Then $S_2$ can be $bba$ / $aaa$ / $abc$ .... You need to find the number of palindromes that can be created by rearranging the letters of both strings, String $S_1$ and String $S_2$. Print the maxi
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