🍅 C++ || 0 ms || Stack || Clean Code || Easy-to-understand 🍅
\t\tclass Solution {\n\t\tpublic:\n\t\t\tbool backspaceCompare(string s, string t) {\n\t\t\tstacks1,s2;\n\t\t\tint n=s.size();\n\t\t\tint m=t.size();\n\t\t\tfor
\t\tclass Solution {\n\t\tpublic:\n\t\t\tbool backspaceCompare(string s, string t) {\n\t\t\tstack<char>s1,s2;\n\t\t\tint n=s.size();\n\t\t\tint m=t.size();\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tif(s[i]==\'#\' and !s1.empty())s1.pop();\n\t\t\t\telse if(s[i]!=\'#\')s1.push(s[i]);\n\t\t\t}\n\t\t\tfor(int i=0;i<m;i++)\n\t\t\t{\n\t\t\t\tif(t[i]==\'#\' and !s2.empty())s2.pop();\n\t\t\t\telse if(t[i]!=\'#\')s2.push(t[i]);\n\t\t\t}\n\t\t\treturn s1==s2;\n\t\t\t}\n\t\t};
['String', 'Stack', 'C', 'C++']