esy approch for anyOne in c++
this is an easy approch using map of pair O(1)space 100% less space then other\n\n\nclass Solution {\npublic:\n\tstring entityParser(string text){\n\t\tstring a
this is an easy approch using map of pair O(1)space 100% less space then other\n\n```\nclass Solution {\npublic:\n\tstring entityParser(string text){\n\t\tstring ans = "";\n\t\tstring temp = "";\n\t\tmap<string,pair<bool,string>>mp;\n\t\tmp["&quot;"] = make_pair(true,"\\"");\n\t\tmp["&apos;"] = make_pair(true,"\'");\n\t\tmp["&amp;"] = make_pair(true,"&");\n\t\tmp["&gt;"] = make_pair(true,">") ;\n\t\tmp["&lt;"] = make_pair(true,"<");\n\t\tmp["&frasl;"] = make_pair(true,"/");\n\n\t\tfor(char c:text){\n\t\t\tif(mp[temp].first)ans+=mp[temp].second,temp = "";\n\t\t\tif(c==\'&\')ans+=temp,temp="",temp+=c;\n\t\t\telse if(c==\' \')ans+=temp,ans+=c,temp = "";\n\t\t\telse temp+=c;\n\t\t}\n\t\tif(mp[temp].first)ans+=mp[temp].second,temp = "";\n\t\telse ans+=temp;\n\t\treturn ans;\n\t}\n};\n```
['C', 'C++']