JAVA (BEATS 100%)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: **O(N)**\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: **O(N)**\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public String entityParser(String text) {\n        Map<String, Character> map = init_map();\n        StringBuilder str = new StringBuilder();\n        int i=0, j=0;\n        while(i<text.length()){\n            if(text.charAt(i)==\'&\'){\n                StringBuilder s = new StringBuilder();\n                j=i+1;\n                while(j<text.length() && text.charAt(j)!=\';\' && text.charAt(j)!=\'&\') {\n                    s.append(text.charAt(j));\n                    j++;\n                }\n                if(j<text.length() && text.charAt(j)!=\'&\'){\n                    char c = map.getOrDefault(s.toString(), \'+\');\n                    if(c!=\'+\') {\n                        str.append(c);\n                        i=j+1;\n                        continue;\n                    }\n                }\n                str.append(text.charAt(i));\n                i++;\n            }else{\n                str.append(text.charAt(i));\n                i++;\n            }\n        }\n        return str.toString();\n    }\n\n    public Map<String, Character> init_map() {\n        Map<String, Character> map = new HashMap<String, Character>();\n        map.put("quot", \'\\"\');\n        map.put("apos", \'\\\'\');\n        map.put("amp", \'&\');\n        map.put("gt", \'>\');\n        map.put("lt", \'<\');\n        map.put("frasl", \'/\');\n        return map;\n    }\n}\n```
['Hash Table', 'Two Pointers', 'Java']