← All problemsSign in

The Return of Palindrome

Problem description Kamaldeep came across a new way to represent a string.This is done by writing each segment of identical characters as the character and the length of the segment. For example the string str = "XXXZZZZZPP" can be represented as [ ('X', 3), ('Z', 5), ('P', 2) ]. In this notation,two consecutive pairs cannot have same character. For example [('T', 4), ('T', 3)] is invalid and i

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