Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome.

Example 1:
Input: "aba"
Output: True

Example 2:
Input: "abca"
Output: True
Explanation: You could delete the character 'c'.

Note:
The string will only contain lowercase characters a-z. The maximum length of the string is 50000.

Solution:

// recersive 

func validPalindrome(s string) bool {
    lenS := len(s)
    if lenS == 0 || lenS == 1{
        return true
    }
    
    i, j := 0, lenS -1
    
    for i < j {
        if s[i] == s[j] {
            i++
            j--
        } else {
            return subPalidrome(s, i+1, j) || subPalidrome(s, i, j-1)
        }
        
    }
    return true
}

func subPalidrome(s string, start, end int) bool {
    for ( start < end) {
        if s[start] == s[end] {
            start++
            end--
        }else {
            return false
        }
    }
    return true



}