Given a string s
, where *
represents a star…
Remove the star along with its closest non-star character to its left in a single operation.
The task is to perform this operation until all stars have been removed and to return the string that remains.