Given a string, check if it is Colindrome or not. A string is said to be colindrome if it has consecutive 3 alphabets followed by the reverse of these 3 alphabets and so on.
Input : cappaccappac Output : String is colindrome Input : mollomaappaa Output : String is Colindrome
Approach : Take two empty strings s1 and s2, and start iterating over the given string. Take first three letters of the string and store it in s1, next three chars in s2 and then match s1 and s2. If they are same then do the same again till length of the given string else return false.
String is colindrome
- Python | Check if a given string is binary string or not
- C Program to Check if a Given String is Palindrome
- Check if a binary string contains consecutive same or not
- Check if two same sub-sequences exist in a string or not
- Check if a string is palindrome in C using pointers
- Program to check if first and the last characters of string are equal
- Python program to check if a string is palindrome or not
- Check whether the Average Character of the String is present or not
- Python program to check if given string is vowel Palindrome
- Check if the characters in a string form a Palindrome in O(1) extra space
- Check if the given string of words can be formed from words present in the dictionary
- Create a new string by alternately combining the characters of two halves of the string in reverse
- Minimal moves to form a string by adding characters or appending string itself
- Find if a string starts and ends with another given string
- Reorder the given string to form a K-concatenated string
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.
Improved By : Abhishekk781