[C++] For Beginners Runtime %61 268ms One Pass Solution
\nclass Solution {\npublic:\n    string entityParser(string text) {\n        map<string,string>m;\n        m["&quot;"]={"\\""};\n        m["&apos;"]={"\'"};\n  
```\nclass Solution {\npublic:\n    string entityParser(string text) {\n        map<string,string>m;\n        m["&quot;"]={"\\""};\n        m["&apos;"]={"\'"};\n        m["&amp;"]={"&"};\n        m["&gt;"]={">"};\n        m["&lt;"]={"<"};\n        m["&frasl;"]={"/"};\n        string result;\n        int lastAmp=-1;\n        for(int i=0;i<text.size();i++){\n            result.push_back(text[i]);\n            if(text[i]==\'&\'){\n                lastAmp=i;\n            }\n            else if(text[i]==\';\'&&i-lastAmp<7&&lastAmp!=-1){\n                auto it = m.find(text.substr(lastAmp,i-lastAmp+1));\n                if(it!=m.end()){\n                    for(int i=it->first.size();i>0;i--){result.pop_back();}\n                    result += it->second;\n                }\n                lastAmp=-1;\n            }\n        }\n        return result;\n    }\n};\n```
['C', 'C++']