Solved Valid Palindrome Problem