added comments to the longest palindrome algorithm