Write a function that takes a string as input and checks whether it can be a valid palindrome by removing at most one character from it.
Constraints:
1≤1 \leq1≤ string.length ≤\leq≤ 10510^510 ...
string.length