← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Problem Statement
Given a string s, return true if the string can be made into a palindrome by deleting at most one character from it.[1][6]
s = "aba" → Output true (already a palindrome, no deletion needed).s = "abca" → Output true (delete 'c' to get "aba").s = "racar" → Output true (delete middle 'c' to get "raar", but actually forms "raca" → wait, standard is delete 'c' for "raar"? Wait, verified as true by skipping mismatch).s = "racecar" with extra char like "racegcar" → false as needs more than one deletion.[7]1 <= s.length <= 10^5s consists of lowercase English letters only.[5][1]