AlgoMaster Logo

Maximum Score From Removing Substrings

s=cdbcbbaaabab,x=4,y=5
0 / 16
algomaster.io
Step:Start: repeatedly scan for "ab" (+4) and "ba" (+5) until neither is left.