Alphabet Soup

Photo by Scott Veg. Retrieved from flickr.com. CC BY 2.0. Source

Andrew is making himself a nice warm bowl of alphabet soup. However, before Andrew can eat the soup, he needs to make sure that it contains every letter of the alphabet. Can you write an algorithm that will tell him if his soup has all of the letters in it, and if not, which letters are missing?


Input is a single line of uppercase letters (A-Z) of length $L$ ($0 <= L <= 1\, 000\, 000$), possibly containing duplicates.


If all letters A-Z are present in the input, the output should be “Alphabet Soup!”. Otherwise, the output should be a single line containing all of the uppercase letters that were missing from the input string, in alphabetical order.

Sample Input 1 Sample Output 1
Alphabet Soup!
Sample Input 2 Sample Output 2
CPU Time limit 1 second
Memory limit 1024 MB
Colin Siles
Source [email protected] High School Programming Competition 2021
License Creative Commons License (cc by-sa)

Please log in to submit a solution to this problem

Log in