100% || easy to understand || simple c++ code
\nclass Solution {\npublic:\n    bool backspaceCompare(string S, string T) {\n            \n         stack <int> s1,s2;\n         string str1,str2; \n          
```\nclass Solution {\npublic:\n    bool backspaceCompare(string S, string T) {\n            \n         stack <int> s1,s2;\n         string str1,str2; \n            \n         for(int i = 0; i < S.size(); i++){\n                 \n                 if(S[i] == \'#\' && !s1.empty())\n                         s1.pop();\n                 \n                 else if(S[i] != \'#\')\n                         s1.push(S[i]);\n                 \n         }\n         \n         for(int i = 0; i < T.size(); i++){\n                 \n                 if(T[i] == \'#\' && !s2.empty())\n                         s2.pop();\n                 \n                 else if(T[i] != \'#\')\n                         s2.push(T[i]);\n                 \n         }\n            \n         while(!s1.empty()){\n                 \n                 str1.push_back(s1.top());\n                 s1.pop();\n                 \n         }\n            \n         while(!s2.empty()){\n                 \n                 str2.push_back(s2.top());\n                 s2.pop();\n                 \n         }      \n            \n         return str1 == str2;   \n    }\n};\n```\n**If you like my code pls upvote my solution**
['Stack', 'C', 'C++']