Leaderboard
Showing:
Handle Score
@Ibrahim Nash 6381
@blackshadows 6329
@mb1973 5388
@Quandray 5231
@akhayrutdinov 5111
@saiujwal13083 4510
@sanjay05 3762
@marius_valentin_dragoi 3522
@sushant_a 3459
@verma_ji 3357
@KshamaGupta 3318
Complete Leaderboard
Vowel or Not
School Accuracy: 44.78% Submissions: 585 Points: 0

Given a English alphabet c, Write a program to check whether a character is a vowel or not.

 

Example 1:

Input:
c = 'a'
Output:
YES
Explanation:
'a' is a vowel.

 

Example 2:

Input:
c = 'Z'
Output:
NO
Explanation:
'Z' is not a vowel.

 

 

Your Task:

You don't need to read input or print anything. Your task is to complete the function isVowel() which takes a character c and returns 'YES' or 'NO'.

 

Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)

 

Note: c is either lowercase or uppercase English alphabetic character

Constraints:

c belongs to English Alphabets.

 

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.

Vowel or Not

Output Window