C++ EASY SOLUTION
```\nclass Solution {\npublic:\n    string entityParser(string text) {\n        string s;\n        stack st;\n        int i=0,j=0;\n        while(i
```\nclass Solution {\npublic:\n    string entityParser(string text) {\n        string s;\n        stack<string> st;\n        int i=0,j=0;\n        while(i<text.size()){\n            if(text[j]==\'&\'){\n                s += text.substr(i,j-i);\n                i=j;\n            }\n            if(text[j]==\'\\0\' || text[j]==\';\'){\n                    st.push(text.substr(i,j-i+1));\n                    if(st.top()=="&quot;") s+=\'\\"\';\n                    \n                    else if(st.top()=="&apos;") s+="\\\'";\n                    \n                    else if(st.top()=="&amp;") s+="&";\n                    \n                    else if(st.top()=="&gt;") s+=">";\n                \n                    else if(st.top()=="&lt;") s+="<";\n                    \n                    else if(st.top()=="&frasl;") s+="/";\n                    \n                    else s+=st.top();\n                    \n                    i=j+1; \n            }\n            j++;\n        }\n        return s;\n    }\n};
[]