* instead. You are given the string typed, everything that was typed, in order.
Each * erases the closest letter to its left that has not been erased yet, and disappears itself. Every star is guaranteed to have something to erase.
Return the final text, a string with no stars.typed='cat*r**ow' → 'cow'
cat → * erases t → car → two * erase r and a → c → then ow is typed. The result is cow.
typed='no**' → ''
Both letters are erased, leaving an empty string.
typed='hello' → 'hello'
typed consists of lowercase English letters and *typed has more stars than letterstyped='cat*r**ow'
'cow'
Run checks the first 3 tests in your browser. Submit checks all 68 tests on the server, hidden ones included.