Solved valid palindrome problem.