NeetCode #352LC-2390MediumStack
← Back to All Problems

#352 · #2390 · Removing Stars From a String(从字符串中移除星号)

📌 Problem Statement & Constraints

You are given a string s containing stars *. In one operation you may remove a star and the closest non-star character to its left. Repeat until no stars remain, and return the resulting string. Constraints: 1 <= s.length <= 10^5; the input guarantees the operation is always possible.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!