Register

# Design an algorithm to check whether a given string is a palindrome or not.

### Add an Answer to "Design an algorithm to check whether a given string is a palindrome or not."

Send me an email when there are new answers to this question

## 7 Answers to "Design an algorithm to check whether a given string is a palindrome or not."

1. Posted by Mar 20th, 2012 at 11:47AM

Like (3)

2. Posted by Mar 20th, 2012 at 12:13PM

you didn't say please, so do it yourself.

Like (2)

3. Posted by Mar 20th, 2012 at 11:46AM

No.

Like (2)

4. Posted by 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)

5. Posted by Mar 20th, 2012 at 12:13PM

When you get to law- come get me

Like (1)

6. Posted by 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)

7. Posted by 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)

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."