Design an algorithm to check whether a given string is a palindrome or not.
Related Questions to Design an algorithm to check whether a given string is a palindrome or not.
Answers to questions are provided for entertainment purposes only.
You should never use answers to questions provided here to replace professional advice, such as from a doctor or lawyer.
This page is for providing answers to the question "Design an algorithm to check whether a given string is a palindrome or not."
7 Answers to "Design an algorithm to check whether a given string is a palindrome or not."
Posted by Dabitch Mar 20th, 2012 at 11:47AM
do your own phkn homework!!!!
Like (3)
Posted by atadir Mar 20th, 2012 at 12:13PM
you didn't say please, so do it yourself.
Like (2)
Posted by Illiteratetroll Mar 20th, 2012 at 11:46AM
No.
Like (2)
Posted by RohithMahesh Apr 10th, 2013 at 12:50AM
step 1 : input n
step 2 : s = 0, a=n
step 3 : while(n>0)
begin
rem=n%10
s=s*10+rem
n=n/10
end
step 4 : if(s==a)
print 'it is a palindrome'
else
print 'it is not a palindrome'
step 5 : stop
Like (1)
Posted by BabzEsq24 Mar 20th, 2012 at 12:13PM
When you get to law- come get me
Like (1)
Posted by LaDefense Mar 20th, 2012 at 11:58AM
Roughly, here 's the idea
for (letter in string)
if (letter[0] == letter[string.length -1])
system.out.println("Yes, the given string is a palindrome")
Hope that helps
Like (1)
Posted by Lacsar Mar 20th, 2012 at 11:48AM
sure - will do your homework - but you have to pay me...... when we get to differential equations it gets expensive so you know....
Like (1)