i
and j
, to point to the end of s
and t
respectively.i
or j
is greater than or equal to 0:
a. Initialize two counters skipS
and skipT
to 0.
b. Move i
and j
backwards, skipping over characters based on the number of backspaces encountered.
c. If the current characters of s
and t
are not backspaces and are not equal, return false
.
d. If one string is exhausted before the other, ensure that the remaining characters in the other string are all backspaces.true
.