Search
⌘K
Get Premium
Leetcode 1717. Maximum Score From Removing Substrings
Given a string s and scores x and y for removing substrings "ab" and "ba", repeatedly delete those substrings to maximize total points. Because deletions can create new pairs, the core challenge is choosing an optimal removal order (commonly handled by greedy stack-based scanning that removes the higher-value pair first).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.