iamantony / CppNotes

My notes about C++
MIT License
1 stars 3 forks source link

Remove smiles from string #24

Open iamantony opened 6 years ago

iamantony commented 6 years ago

Given a string, find start and end positions of all smiles in string. Each smile starts with “:-” and then an unlimited number of “)” or “(” could go. Remove found smiles. And don't forget to check if new smiles have appeared in string (example - ':-:-)(' ). Do it optimally!