Today, I was fooling around with a couple of programming puzzles. Faced with the task of testing a string to see whether or not it is a palindrome, I conceived of several ways t
You can't do a palindrome check faster than O(n) (n being the length of the input string). Any extra effort (stacks, reversing the string etc.) won't give you any perforce improvement, it only costs memory.