solve triangle and valid palindrome