solution using two pointer and stack. 100% runtime beats
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:\n<!-- Add your time complexity here, e.g. $$O(n)$$ --> \n$$O(n)$$, $$O(n+m)$$\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(1)$$,$$O(m)$$\n\n# Code\n```\nclass Solution {\npublic:\n    bool backspaceCompare(string s, string t) {\n           string a="";\n        for(int i=0;i<s.size();i++){\n            if(s[i]==\'#\'&&a.empty()) continue;\n            if(s[i]==\'#\')\n              a.pop_back();\n            else\n            a.push_back(s[i]);\n        }\n          string b="";\n        for(int i=0;i<t.size();i++){\n            if(t[i]==\'#\' &&b.empty()) continue;\n             if(t[i]==\'#\')\n              b.pop_back();\n            else\n            b.push_back(t[i]);\n        }\n        if(a==b)\n        return true;\n        else\n        return false;\n    }\n};\n```\n\n---\n\n**Please Upvote Me**\n# second approce using two pointer\n```\nclass Solution {\npublic:\n    string removeHash(string a) {\n        int c = -1;\n        for (int i = 0; i < a.size(); i++) {\n            if (a[i] == \'#\') {\n                c--;\n                if (c < -1)\n                    c = -1;\n            } else {\n                c++;\n                a[c] = a[i];\n            }\n        }\n        a.resize(c + 1);\n        return a;\n    }\n\n bool backspaceCompare(string s, string t) {\n   string s1=removeHash(s);\n   string t1=removeHash(t);\n  return (s1==t1);\n}\n}\n;\n```
['Two Pointers', 'String', 'Stack', 'Simulation', 'C++']