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 if any anagram of a string is palindrome or not
- C Program to Check if a Given String is Palindrome
- Check given string is oddly palindrome or not | Set 2
- Check whether the given string is Palindrome using Stack
- Check given string is oddly palindrome or not
- Check if both halves of a string are Palindrome or not
- Check if a given string is a rotation of a palindrome
- Check if a string is palindrome in C using pointers
- 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
- Python program to check if a string is palindrome or not
- Check if there exists any sub-sequence in a string which is not palindrome
- Java program to check whether a string is a Palindrome
- Check if string is palindrome after removing all consecutive duplicates
- Check if a string can be rearranged to form special palindrome
- Python program to check if given string is vowel Palindrome
- TCP Client-Server Program to Check if a Given String is Palindrome
- Check if characters of a given string can be rearranged to form a palindrome
- Check if string can be rearranged so that every Odd length Substring is 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.
Improved By : sanjoy_62