Skip to content
Veltoryx Technologies
ProProblem 19● EasyLeetCode #844 ↗3 min readUpdated 30 October 2026

Backspace String Compare

Compare two typed texts where

01The problem

Two strings are typed into empty text editors, where # means backspace. Return true if both editors end up with the same text. Backspace on an empty editor does nothing. Can you do it in O(1) extra space?

stOutputWhy
"ab#c""ad#c"trueboth "ac"
"a#c""b"false"c" vs "b"

Constraints: length 1 to 200, lowercase letters and #.

Loading the rest of the lesson…