News for hackers. Stuff that matters.
Re:Can you solve it? The Greplin programming challenge by johnfn on Friday October 08, 2010 @07:44PM (#1773880)
3-4 minutes!

Try this:

    for i in range(len(str)):
         for j in range(i, len(str)):
              if str[i:j] == str[i:j][::-1]:
                  #...
Choose the start and end indices. Then take a slice to see if it's a palindrome. Nice and speedy! :)

There are no comments on this comment yet.