HTMLify
LeetCode - Delete Characters to Make Fancy String - Python
Views: 187 | Author: abh
class Solution:
def makeFancyString(self, s: str) -> str:
for c in set(s):
while c*3 in s:
s = s.replace(c*3, c*2)
return s