Given a string str, the task is to check if the given string is Even-Odd Palindrome or not.
An Even-Odd Palindrome string is defined to be a string whose characters at even indices form a Palindrome while the characters at odd indices also form a Palindrome separately.
String formed by characters at odd indices: bzb, which is a Palindrome.
String formed by characters at even indices: aza, which is a Palindrome.
Hence, the given string is an Even-Odd Palindrome.
Approach: To solve the problem, create a new String by appending the Odd Indexed Characters of the given string and check if the strings formed are palindromic or not. Similarly, check for Even Indexed Characters. If both the strings are palindromic, then print “Yes”. Otherwise, print “No”.
Below is the implementation of the above approach:
- Check given string is oddly palindrome or not | Set 2
- Check given string is oddly palindrome or not
- Python program to check if a string is palindrome or not
- Check if any anagram of a string is palindrome or not
- Check if there exists any sub-sequence in a string which is not palindrome
- Check if both halves of a string are Palindrome or not
- Sentence Palindrome (Palindrome after removing spaces, dots, .. etc)
- Count all palindrome which is square of a palindrome
- Check if a given string is a rotation of a palindrome
- C Program to Check if a Given String is Palindrome
- Check if characters of a given string can be rearranged to form a palindrome
- Given two strings check which string makes a palindrome first
- Check if it is possible to create a palindrome string from given N
- Python program to check if given string is vowel Palindrome
- TCP Client-Server Program to Check if a Given String is Palindrome
- Check whether the given string is Palindrome using Stack
- Check if string remains palindrome after removing given number of characters
- Check linked list with a loop is palindrome or not
- Check if a doubly linked list of characters is palindrome or not
- To check a number is palindrome or not without using any extra space
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.