This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

is thie the algorithm for cheking  RSS feed

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Report post to moderator
step1. mid_index = (total_length - 1)/2 (for odd) or (total_length/2)-1 for even

step2. max_index = total_length - 1 (to pick up letters from end)

step2. loop_index = 0

step3. pick letter at loop_index, pick letter at max_index - loop_index

step4. compare them, if not equal, print "not palindrome" and exit.

step5. loop_index = loop_index + 1

step6. if loop_index > mid_index goto step7 else goto step3

step7. end of loop, and no mismatch found. Hence print "palindrome" and exit.



This is the algorithm for checking if NITIN is a aplindrome or not is it ryt friends
 
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Report post to moderator

This is the algorithm for checking if NITIN is a aplindrome or not is it ryt friends


Why dont you check it out yourself

And while posting use UseRealWords."ryt" is no a real word.
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
And do not ask the same question more than once, it wastes useful time of others and also reduces the the number of replies you get.
Read this for more information.
someone among the moderators will close this thread.
 
author
Posts: 23821
140
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Yes, let's continue this in the orignal thread...

http://www.coderanch.com/t/411445/java/java/check-whether-word-palindrome

I will close this one.

Henry
 
Liar, liar, pants on fire! refreshing plug:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!