Re:How a 19-Year-Old Raised $5 Million to Revolutionize Search
by erwanb on Tuesday March 01, 2011 @01:44PM
(#2276634)
here is a naive but working way to do it in ruby : https://gist.github.com/849625
[ Parent
| on HN ]
Re:How a 19-Year-Old Raised $5 Million to Revolutionize Search
by ntoshev on Tuesday March 01, 2011 @03:26PM
(#2277040)
Python:
max((s[start:end] for start in xrange(len(s)) for end in xrange(start, len(s)) if s[start:end]==s[start:end][::-1]), key=len)
Re:How a 19-Year-Old Raised $5 Million to Revolutionize Search
by iworkforthem on Tuesday March 01, 2011 @01:48PM
(#2276652)
Thank you.
0.upto(string.length - password_length) do |index| that's the line of logic I didn't it get correct.