2390. Removing Stars From a String
You are given a string s, which contains stars *. In one operation, you can: - Choose a star in s. - Remove the closest non-star character to its left, as well as remove the star itself. Return the string after all stars have been removed. Note: - The input will be generated such that the operation is always possible. - It can be shown that the resulting string will always be unique. Exa
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start