gary@interview:~/interview/coding/844-backspace-st….md$
$ cat ./coding/844-backspace-string-compare.md
[Coding]

844. Backspace String Compare

────────────────────────────────────────────────────────────

844. Backspace String Compare

class Solution:
    def backspaceCompare(self, s: str, t: str) -> bool:
        
        a = []
        for i in range(len(s)):
            if s[i] == '#':
                if len(a) > 0:
                    a.pop()
            else:
                a.append(s[i])
        
        b = []
        for i in range(len(t)):
            if t[i] == '#':
                if len(b) > 0:
                    b.pop()
            else:
                b.append(t[i])
        
        return ''.join(a) == ''.join(b)

        
--tags#Stack
$ ls ./coding/ | grep -v 844-backspace-string-compare
265. Paint House II256. Paint House143. Reorder List1762. Buildings With an Ocean View
← cd ../codingcd ~