Horje
Goal Parser Interpretation leetcode in c++ Code Example
Goal Parser Interpretation leetcode in c++
class Solution {
public:
    string interpret(string command) {
        string s;
        for(int i=0;i<command.length();i++)
        {
            if(command[i]=='G')
            {
                s+="G";
            }
            if(command[i]=='('&&command[i+1]==')')
            {
                s+="o";
            }
            if(command[i]=='('&&command[i+1]=='a')
            {
                s+="al";
            }
        }
        return s;
    }
};




Cpp

Related
assert warning c++ Code Example assert warning c++ Code Example
ue4 float to fstring Code Example ue4 float to fstring Code Example
five Code Example five Code Example
is obje file binary?? Code Example is obje file binary?? Code Example
pallindrome string Code Example pallindrome string Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10