Lets convert all '$ab$' to '$bb$' as they can be minimized to '$b$'. Then as a result we will get one of the three types of strings after applying operations.

  • If we get '$aaa...a$' then the minimized string will be '$a$'.
  • If we get '$bbb...b$' then the minimized string will be '$b$'.
  • If we get '$bbb...a$' then the minimized string will be '$ba$'.

Contributors

Statistics

74% Solution Ratio
Alamin_1804084Earliest, Feb '21
StreetwalkerFastest, 0.0s
zihad1783Lightest, 0 B
bokaifShortest, 114B
Toph uses cookies. By continuing you agree to our Cookie Policy.