Missing Vowels
InterviewTime limit2sMemory limit1024 MB
Check whether the short name s can be formed from the full name f by deleting only vowels (a, e, i, o, u, y), ignoring letter case.
- Level
Easy3 of 10
- Topics
- String, Two pointers
- Solved
- No attempts yet
Input and Output
There are many ways to write a word on paper. For example, some writing systems, like Arabic and Hebrew, omit most vowels, although they write some of them.
In this problem, we will only consider strings consisting of English letters and hyphens. The letters a, e, i, o, u, and y are vowels, while hyphens and all other letters are consonants. All comparisons are case-insensitive: uppercase and lowercase versions of the same letter are equal.
You are given two strings and , called the short name and the full name. Check whether the short name can be obtained from the full name by omitting some vowels (possibly none).
Input
The first line contains a single string , the short name.
The second line contains a single string , the full name.
Each string is non-empty and consists of at most English letters and hyphens.
Output
Print "Same" if the short name can be obtained from the full name by omitting some vowels, and "Different" otherwise.