Delete Characters to Make Fancy String
A fancy string has no three equal characters in a row. Delete the fewest characters from s to make it fancy: in every run of equal characters, keep only the first two. Return the result.
Example 1
s "leeetcode"
returns "leetcode"
Three e become two: leetcode.
Example 2
s "aaabaaaa"
returns "aabaa"
Runs aaa and aaaa shrink to aa: aabaa.
Constraints
1 <= len(s) <= 100- Lowercase letters only
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.