Register

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

Is This A Good Question? (4)

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. Dabitch - 51-55 years old - female

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

    do your own phkn homework!!!!

    Like (3)

  2. atadir - 51-55 years old - male

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

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

    Like (2)

  3. Illiteratetroll - 41-45 years old

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

    No.

    Like (2)

  4. RohithMahesh - 13-15 years old

    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)

  5. BabzEsq24 - 46-50 years old - female

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

    When you get to law- come get me

    Like (1)

  6. LaDefense - 22-25 years old - male

    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)

  7. Lacsar - 36-40 years old

    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)

Ask A Question

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