SIMPLE STACK C++ SOLUTION
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+m)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:o(n+m)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    private:\n    string processString( string& str){\n        stack<char>editor;\n        for(auto&c : str){\n            if(c != \'#\'){\n                editor.push(c);\n            }else if (!editor.empty()){// c==\'#\' so we are removing the letter bcoz backspace\n                editor.pop();\n            }\n        }\n        string result;\n        while(!editor.empty()){\n            result += editor.top();\n            editor.pop();\n        }\n       \n        return result;\n    }\npublic:\n    bool backspaceCompare(string s, string t) {\n        return processString(s) == processString(t);\n    }\n};\n\n```
['C++']