Available question text
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).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1717. Maximum Score From Removing Substrings
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source