Working version of the palindrome problem. Brute force - takes about 4min 13s on my pc.
Improved version - takes about 2 minutes 37 seconds to run.
 A bit more of a speed improvement to the palindrome problem.