5ms Java StringBuilder
Trick StringBuilder inherits equals() from java.lang.Object, and as such StringBuilder.equals() returns true only when passed the same object as an argument. In
**Trick**
**StringBuilder** inherits equals() from java.lang.Object, and as such StringBuilder.equals() returns true only when passed the same object as an argument. In other words, it tests for **object equality** rather than **functional equality**. 
**Code**
```
    public boolean backspaceCompare(String S, String T) {
        
        // Corner cases to add.
        
        return buildString(S).equals(buildString(T));
    }
    
    private String buildString(String str) {
        
        StringBuilder sb = new StringBuilder();
        for (char ch : str.toCharArray()) {
            if (ch != '#') {
                sb.append(ch);
            } else if (sb.length() != 0) {
                sb.deleteCharAt(sb.length() - 1);
            }
        }
        
        return sb.toString();
    } 
```
Thank you ✧⁺⸜(●˙▾˙●)⸝⁺✧
[]