Given a string (may contain both vowel and consonant letters), remove all consonants, then check if the resulting string is palindrome or not.
Input : abcuhuvmnba Output : YES Explanation : The consonants in the string "abcuhuvmnba" are removed. Now the string becomes "auua". Input : xayzuezyax Output : NO Input : bkldhgcj Output : -1
Remove all the consonants in the string. Check if the vowel string is a palindrome. If it is a palindrome print YES, else print NO. If string contains no vowels, then print -1.
Below is the Python implementation:
- Python program to check if a string is palindrome or not
- C Program to Check if a Given String is Palindrome
- Python program to check if number is palindrome (one-liner)
- Python program to check if a given string is Keyword or not
- Python program to check if given string is pangram
- Python program to check if a string contains all unique characters
- Check if any anagram of a string is palindrome or not
- Check if a string is palindrome in C using pointers
- Check if a given string is a rotation of a palindrome
- Check if it is possible to create a palindrome string from given N
- Recursive function to check if a string is palindrome
- Given two strings check which string makes a palindrome first
- Check if there exists any sub-sequence in a string which is not palindrome
- Check if characters of a given string can be rearranged to form a palindrome
- Check if a string can be rearranged to form special palindrome
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.