Efficient O(n) solution || Easy to understand
\n# Code\n\nclass Solution {\npublic:\n    string parsedString(string input){\n        if(input=="&quot;"){\n            string s="";\n            return s+\'"\
\n# Code\n```\nclass Solution {\npublic:\n    string parsedString(string input){\n        if(input=="&quot;"){\n            string s="";\n            return s+\'"\';\n        }\n        else if(input=="&apos;"){\n            return "\'";\n        }\n        else if(input=="&amp;"){\n            return "&";\n        }\n        else if(input=="&gt;"){\n            return ">";\n        }\n        else if(input=="&lt;"){\n            return "<";\n        }\n        else if(input=="&frasl;")\n            return "/";\n        else\n            return input;\n    }\n    string entityParser(string text) {\n        string res="";\n        for(int i=0;i<text.length();i++){\n            \n            if(text[i]==\'&\'){\n                if(i+1<text.length() && text[i+1]==\'&\'){\n                    res+=text[i];\n                }\n                else{\n                    string temp="";\n                    while(i<text.length() && text[i]!=\';\'){\n                        temp+=text[i];\n                        i++;\n                    }\n                    if(i<text.length() && text[i]==\';\'){\n                        temp+=\';\';\n                    }\n                    res+=parsedString(temp);\n                }\n            }\n            else{\n                res+=text[i];\n            }\n\n        }\n        return res;\n        \n    }\n};\n```
['C++']