Class Solution
java.lang.Object
g0801_0900.s0844_backspace_string_compare.Solution
844 - Backspace String Compare.<p>Easy</p>
<p>Given two strings <code>s</code> and <code>t</code>, return <code>true</code> <em>if they are equal when both are typed into empty text editors</em>. <code>'#'</code> means a backspace character.</p>
<p>Note that after backspacing an empty text, the text will continue empty.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> s = “ab#c”, t = “ad#c”</p>
<p><strong>Output:</strong> true</p>
<p><strong>Explanation:</strong> Both s and t become “ac”.</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> s = “ab##”, t = “c#d#”</p>
<p><strong>Output:</strong> true</p>
<p><strong>Explanation:</strong> Both s and t become "".</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> s = “a#c”, t = “b”</p>
<p><strong>Output:</strong> false</p>
<p><strong>Explanation:</strong> s becomes “c” while t becomes “b”.</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= s.length, t.length <= 200</code></li>
<li><code>s</code> and <code>t</code> only contain lowercase letters and <code>'#'</code> characters.</li>
</ul>
<p><strong>Follow up:</strong> Can you solve it in <code>O(n)</code> time and <code>O(1)</code> space?</p>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
backspaceCompare
-