Generating Palindromes - trivial edits.
Solves the Leftmost pair problem, kind of guessed at the answer to some
extent, but retrospectively and from the comments on the blog found an
explanation for the algorithm.