EASIEST C++ USING MAP
\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 ans="",fa="";\n        int i=0;bool bnd=false;\n        for(i=0;i<text.size();i++){\n            if((text[i]==\'&\'||bnd==true)&&text[i]!=\';\'){\n                bnd=true;\n                fa+=text[i];\n            }\n            else if(text[i]==\';\'){\n                if(m.find(fa)!=m.end()){\n                   ans+= m[fa];\n                }\n                else{\n                    ans+=fa+\';\';\n                }\n                 fa="";\n                bnd=false;\n            }\n            else {\n            ans+=text[i];\n           }\n        }\n        \n        \n        return ans;\n    }\n};\n```
[]