Program to determine whether a given string is PalindromeExplanationIn this program, we need to check whether a given string is palindrome or not. A string is said to be palindrome if it reads the same backward as forward. For e.g. above string is a palindrome because if we try to read it from backward, it is same as forward. One of the approach to check this is iterate through the string till middle of string and compare a character from back and forth. Algorithm
SolutionPythonOutput: Given string is palindrome COutput: Given string is palindrome JAVAOutput: Given string is palindrome C#Output: Given string is palindrome PHPOutput: Given string is palindrome Next Topic# |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India