Re:Can you solve it? The Greplin programming challenge
by djacobs on Tuesday October 19, 2010 @11:01PM
(#1809777)
Interesting, I'll have to go over your code fairly carefully, as I'm not familiar with every technique you're using here for performance.
I've since learned a good deal about Clojure and implemented an idiomatic (but probably less performant) version, for anyone interested in how short this can be:
http://gist.github.com/621130
I can't take credit for the solution I posted though.
I originally wrote a naive O(N^2) complexity solution (which was much shorter and was fine for the length of the input) I had this palindrome code in my 'toolbox' of code I've come across though, I'm afraid I don't know the orig author.
I just tweaked it as this is more in line with the type of example you're looking for.