S is string containing only lowercase English alphabets. We need to find if there exists at least one palindromic sub-string whose length is even.
Input : aassss Output : YES Input : gfg Output : NO
Notice that a palindrome of even length must contain two same alphabets in the middle. So we just need to check for this condition. If we find two consecutive same alphabets in the string then we output “YES” otherwise “NO”.
Below is the implementation:
- Minimum length of substring whose rotation generates a palindromic substring
- Check if string can be rearranged so that every Odd length Substring is Palindrome
- Maximum length palindromic substring such that it starts and ends with given char
- Check if a substring can be Palindromic by replacing K characters for Q queries
- Longest palindromic string possible after removal of a substring
- Construct a string of length L such that each substring of length X has exactly Y distinct letters
- Check if all the palindromic sub-strings are of odd length
- Check if an array has some palindromic subsequence of length at least 3
- Number of strings of length N with no palindromic sub string
- Length of longest palindromic sub-string : Recursion
- Find length of longest subsequence of one string which is substring of another string
- Longest Palindromic Substring using Palindromic Tree | Set 3
- Convert to a string that is repetition of a substring of k length
- Maximum length substring with highest frequency in a string
- Queries to check if string B exists as substring in string A
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.