You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>You are given a string <code>s</code>. It may contain any number of <code>'*'</code> characters. Your task is to remove all <code>'*'</code> characters.</p>
2
+
3
+
<p>While there is a <code>'*'</code>, do the following operation:</p>
4
+
5
+
<ul>
6
+
<li>Delete the leftmost <code>'*'</code> and the <strong>smallest</strong> non-<code>'*'</code> character to its <em>left</em>. If there are several smallest characters, you can delete any of them.</li>
7
+
</ul>
8
+
9
+
<p>Return the <spandata-keyword="lexicographically-smaller-string">lexicographically smallest</span> resulting string after removing all <code>'*'</code> characters.</p>
<p>We should delete one of the <code>'a'</code> characters with <code>'*'</code>. If we choose <code>s[3]</code>, <code>s</code> becomes the lexicographically smallest.</p>
0 commit comments