← All problemsSign in

Magical string

Chef's son Rohan is giving his English exam, he has come unprepared and knows none of the answers. He started writing anything at random. Now, he is left with a lot of time before the exams end. So, Rohan has decided to at least have some fun by counting magical words in his Answer sheet. Rohan is connecting pairs of identical letters (A with A, B with B) by drawing arches above the word. A given

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