class Solution:
def validPalindrome(self, s: str) -> bool:
if s == s[::-1] : return True
idx = 0
while idx < len(s)/2 and s[idx] == s[-idx-1] :
idx +=1
s = s[idx:len(s)-idx]
return s[1:] == s[1:][::-1] or s[:-1] == s[:-1][::-1]
맨처음에 내가 생각했던 건
while idx < len(s)/2
if s[idx] == s[-idx-1] :
idx +=1
이렇게 이어가려고 했는데, 시간초과..가 났다
왜 시간초과가 났는지에 대한 부분은 계속 찾고 있다ㅠ
시간복잡도의 경우, 같은 O(N)인것 같은데 왜그럴까