beats 100% time
IntuitionThe problem requires comparing two strings after processing backspaces (#). Instead of modifying the strings directly, we can use stacks to simulate th
# Intuition  
The problem requires comparing two strings after processing backspaces (`#`). Instead of modifying the strings directly, we can use stacks to simulate the effect of backspaces efficiently.  

# Approach  
1. Use two lists (`a` and `b`) to simulate stack behavior for both input strings.  
2. Iterate through each character in `s`:  
   - If the character is not `#`, push it onto the stack.  
   - If it is `#`, pop from the stack if it's not empty.  
3. Repeat the same process for `t`.  
4. Finally, compare both stacks. If they are equal, return `True`; otherwise, return `False`.  

# Complexity  
- **Time complexity:** \(O(n + m)\), where \(n\) and \(m\) are the lengths of `s` and `t`, as we iterate through both strings once.  
- **Space complexity:** \(O(n + m)\) in the worst case, where all characters are stored in stacks.

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

        
```
['Stack', 'Python3']