Why the expected answer for "abababababababababaaa" is 2?


  • 0
    C

    I think in this case, in order to make it become a strong password, we should at least do two replace operations and one deletion operation( the replacement wont change the length of the password and the deletion wont do any help for the password to satisfy the condition 2), which takes three operations in total.


  • 0
    Y

    Hi,

    It should be 3 instead of 2. Sorry about the confusion :)


  • 0
    X

    Why we cannot delete the last character and then change the last character to an upper letter? I think we need only 2 operations in this case.


  • 0
    X

    I forget the digit...ignore me...


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.