← All problemsSign in

Palindromes

Shashank is the head of the Environment Sustainability Management Committee. He wants to give a token of appreciation to Prachi for his contributions to their purpose. For this purpose, he has bought N pairs of letters where each letter is either 'a' or 'b'. Thus, the possible pairs are 'aa', 'ab', 'ba', 'bb'. Now Prachi is very fond of palindromes, so Shashank decided to concatenate some(or none

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