c++ | 0ms Code | easy to understand | with explanation
\n\'\'\'\n\n\t\tclass Solution {\n\t\tpublic:\n\t\tstring modifyString(string s) {\n        int n = s.length();\n        for(int i=0;i<n;i++){\n            \n  
\n\'\'\'\n\n\t\tclass Solution {\n\t\tpublic:\n\t\tstring modifyString(string s) {\n        int n = s.length();\n        for(int i=0;i<n;i++){\n            \n            //checking every character, if character is \'?\'\n            if(s[i] == \'?\'){\n                \n                //loop over every alphabet\n                for(char j = \'a\';j<=\'z\';j++){\n                    //compare with previous char\n                    if(i-1>=0 && j==s[i-1]) continue;\n                    //compare with next char\n                    if(i+1<n && j==s[i+1]) continue;\n                    //if both the above conditions are false, fix the current alphabet in that\n                    //position and break the loop\n                    s[i] = j;\n                    break;\n                }\n            }\n            \n            //check next char of the string\n            \n        }\n        return s;\n    }\n\t};\n\n\'\'\'\nPlease **Upvote** my ans if you understand
['C', 'C++']