Backspace String Compare
Given two editor input strings s and t, return true when both produce the same text after applying every backspace. The character # is a backspace; applying…
Given two editor input strings `s` and `t`, return `true` when both produce the same text after applying every backspace. The character `#` is a backspace; applying it to an empty editor leaves the editor empty.
- `0 <= s.length, t.length <= 200` - Each string contains lowercase English letters and `#` characters. - The interactive visualizer accepts at most 20 characters per string.
Example 1: input s = "ab#c", t = "ad#c"; output true. Both editor streams produce "ac".
Example 2: input s = "a#c", t = "b"; output false. The first stream produces "c", while the second produces "b".
Example 3: input s = "ab##", t = "c#d#"; output true. Both streams erase every typed letter and produce the empty string.
Category: Strings. Topic: strings. Difficulty: Easy. Patterns: two-pointers, stack.