How to solve this ??

Правка en1, от bhagya.kjain, 2023-11-15 13:16:08

Given a string, compress the string as optimal as possible by removing the consecutive characters if 3 or more consecutive characters .

This is like a candy crush game !

Eg : Input : "aabbbbac", output will be "c" .

First, you can remove all the "bbbb", then string turns to be "aaac".

Then, "aaac" turns to be "c" .

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский bhagya.kjain 2023-11-15 13:16:08 357 Initial revision (published)