Swift - 0 ms
\nclass Solution {\n    func backspaceCompare(_ S: String, _ T: String) -> Bool {\n        return getEditedVersion(of: S) == getEditedVersion(of: T)\n    }\n   
```\nclass Solution {\n    func backspaceCompare(_ S: String, _ T: String) -> Bool {\n        return getEditedVersion(of: S) == getEditedVersion(of: T)\n    }\n    \n    func getEditedVersion(of text: String) -> String {\n        var result: String = ""\n        \n        for char in text {\n            if char == "#" {\n                if !result.isEmpty {\n                    result.removeLast()    \n                }\n            }\n            else {\n                result.append("\\(char)")\n            }\n        }\n        \n        print(result)\n        return result\n    }\n}\n```
['Swift']