• + 0 comments

    So the answer to "ab" is 2? (Yes, it is, I had the chance to find it out for 5 hackos.) As you write, if the string only has one character, or boils down to one char after deleting all the repeating ones, the answer should be 0. This was not clear from the text, I first thought in such case the answer should be 1. Then I thought the answer is 0 because I didn't delete anything. From the wording it was not clear whether it is obligatory to delete at least one character, or it's ok not to delete anything. It cost me again 5 hackos to understand that I was wrong. :-(