Leetcode 2390. Removing Stars From a String
Given a string where each '*' deletes the nearest preceding non-star character (and the '*' itself), return the resulting string after all deletions. The core challenge is to simulate these left-to-right deletions efficiently for up to 1e5 characters, typically with a stack or in-place two-pointer approach in linear time.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.