Valid Palindrome II

STRING

Problem

Given a string text, determine if it is possible to make it a palindrome by deleting at most one character. Return true if it is possible, otherwise return false.

Examples

isAlmostPalindrome("radar") // returns true // The text is already a palindrome // No need to alter any character isAlmostPalindrome("test") // returns true // You could remove the character 's' to make it "tet", a palindrome. isAlmostPalindrome("hello") // returns false
Loading...