Archive for June 2007
Palindrome
While going through a Ruby tutorial website, i came across the term “Palindrome” http://en.wikipedia.org/wiki/Palindrome
“A palindrome is a word, phrase, number or other sequence of units that has the property of reading the same in either direction”
Eg: “Hannah”, “Damn, I, Agassi, miss again! Mad!” (http://www.palindromelist.com/)
Check out the longest Palindrome ever (http://norvig.com/pal2txt.html )
First Ruby Play-around
String:
“Kenny”.chop.chop => “Ken”
“Kenny”.chop.chop.chop => “Ke”