Similar Strings
CodeChefOpen on judge ↗
*Chota Pendrive* likes to play with strings a lot. For a given string **s**, he obtains its compressed string in the following way: - In a single operation, he takes any two consecutive equal characters of **s**, and removes one of them. - He keeps doing this operation as long as possible. The resulting string will be the compressed string of **s**. For example, if the initial string is `"abaaab
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