Python3 O(N) Solution without replace function
python\nclass Solution:\n    def entityParser(self, text: str) -> str:\n        table = {\'&quot;\': \'"\',\n                 \'&apos;\': \'\\\'\',\n           
```python\nclass Solution:\n    def entityParser(self, text: str) -> str:\n        table = {\'&quot;\': \'"\',\n                 \'&apos;\': \'\\\'\',\n                 \'&amp;\': \'&\',\n                 \'&gt;\': \'>\',\n                 \'&lt;\': \'<\',\n                 \'&frasl;\': \'/\'}\n        \n        ans = \'\'\n        special = \'\'\n        for c in text:\n            if c != \'&\':\n                if special == \'\':\n                    ans += c\n                else:\n                    special += c\n                    if c == \';\':\n                        if special in table:\n                            ans += table[special]\n                            special = \'\'\n                        else:\n                            ans += special\n                            special = \'\'\n            else:\n                ans += special\n                special = \'&\'\n        return ans\n                \n            \n        \n```
[]