We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I think the problem statement is still off; or the Python solution is wrong. If you can only remove one character, then the input "aaabbbcc" should output "NO". However the Python solution provided would output "YES", because it essentially ignores all counts of one letter.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Concatenate
You are viewing a single comment's thread. Return to all comments →
I think the problem statement is still off; or the Python solution is wrong. If you can only remove one character, then the input "aaabbbcc" should output "NO". However the Python solution provided would output "YES", because it essentially ignores all counts of one letter.