gary@interview:~/interview/coding/1544-make-the-st….md$
$ cat ./coding/1544-make-the-string-great.md
[Coding]

1544. Make The String Great

────────────────────────────────────────────────────────────

1544. Make The String Great

class Solution:
    def makeGood(self, s: str) -> str:
        
        if len(s) == 0:
            return s
        
        res = []
        
        for c in s:
            if res:
                if res[-1].upper() == c.upper():
                    if (res[-1].isupper() and c.islower()) or (res[-1].islower() and c.isupper()):   
                        res.pop()
                        continue
            res.append(c)
        return ''.join(res)
            
--tags#Stack
$ ls ./coding/ | grep -v 1544-make-the-string-great
265. Paint House II256. Paint House143. Reorder List1762. Buildings With an Ocean View
← cd ../codingcd ~