AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
String palindrome program in cobol8/29/2023 ![]() The code is very easy to understand and use. This article is contributed by NishantSingh(Pintu).If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to In this article I would like to share with you a sample program the I wrote in PERL CGI to accept a string and then it will check if the given string is a palindrome or not a palindrome. Output: 3 Time complexity: O(n 2) Auxiliary Space: O(n 2) Count All Palindrome Sub-Strings in a String Set 2.05 first-name pic x(10) value 'Mahender ' 05 Last name pic x(10) value 'Reddy ' 05 initial pic x(2) value 'G '. String is used to combine two or more strings/variables in to a single string. STRING AND UNSTRING with examples: TALLYING and COUNT options. ![]() If both are equal, then we can say that the given string is a palindrome. In the following example, we shall reverse the given string in Java using StringBuilder, and compare it with its original value. String could be a palindrome if it equals the reverse of it. Check Palindrome String using StringBuilder.
0 Comments
Read More
Leave a Reply. |