simple circular C++ 100% faster
\nclass Solution {\npublic:\n    string modifyString(string s) {\n        int j = 0;\n        for(int i = 0; i < s.size(); ++i){\n            char c = s[i];\n  
```\nclass Solution {\npublic:\n    string modifyString(string s) {\n        int j = 0;\n        for(int i = 0; i < s.size(); ++i){\n            char c = s[i];\n            if(c == \'?\'){\n                char l = i > 0 ? s[i-1] : \'*\';\n                char r = i < s.size() - 1 ? s[i + 1] : \'*\';\n                char tmp = \'a\' + j;\n                while(tmp == l || tmp == r){\n                    j = (j + 1) % 26;\n                    tmp = \'a\' + j;\n                }\n                s[i] = tmp;\n            }\n        }\n        return s;\n    }\n};\n```
[]