You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return 0 if left == right or (left == right-1 and str[left] == str[right])
return 1 if left == right-1
if str[left] == str[right] then min_for_palindrome(str, left+1, right-1) else [min_for_palindrome(str,left+1, right), min_for_palindrome(str,left,right-1)].min + 1 end