C++ Simple And Easy Explanation :-  100% Memory And 100% speed 0ms /O(1) space & O(N) Time
Implementation using two pointer- 1st to traverse the string and second to store the character at given position\n Suppose 2 pointer i & k\n Start traversing th
Implementation using two pointer- 1st to traverse the string and second to store the character at given position\n* Suppose 2 pointer i & k\n* Start traversing the by first pointer(i) if it is # then decrease the 2nd pointer(k )(k>=0)  .And if it is not # then increase the pointer(k) and store the element at k th position.\n```S[k]=S[i] ```\n* Same will be done to 2nd string And suppose its 2nd pointer is p\n* If k and p are not equal means the string have differnt length. If same, then compare every element.\n```\nclass Solution {\npublic:\n    bool backspaceCompare(string s, string t) {\n        int k=0,p=0;\n        for(int i=0;i<s.size();i++)\n        {\n            if(s[i]==\'#\')\n            {\n                k--;\n                 k=max(0,k);\n            }\n            \n           else\n           {\n               s[k]=s[i];\n               k++;\n           }\n        }\n        for(int i=0;i<t.size();i++)\n        {\n            if(t[i]==\'#\')\n            {\n                p--;\n                 p=max(0,p);\n            }\n            \n           else\n           {\n               t[p]=t[i];\n               p++;\n           }\n        }\n        if(k!=p)\n            return false;\n        else\n        {\n            for(int i=0;i<k;i++)\n            {\n                if(s[i]!=t[i])\n                    return false;\n            }\n            return true;\n        }\n        \n    }\n};\n```
['C', 'C++']