Given a string s consisting of letters, perform basic string compression using counts of repeated consecutive characters. For instance, "aabcccccaaa" becomes "a2b1c5a3". If the compressed string is…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.