| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 | package mainimport (	"strings")func isPalindromeOld(s string) bool {	lower := strings.ToLower(s)	arr := make([]byte, 0)	for i := 0; i < len(lower); i++ {		if (lower[i] >= 'a' && lower[i] <= 'z') || (lower[i] >= '0' && lower[i] <= '9') {			arr = append(arr, lower[i])		}	}	for i, j := 0, len(arr)-1; i < j; i, j = i+1, j-1 {		if arr[i] != arr[j] {			return false		}	}	return true}func isAlphanum(c byte) bool {	lower := c >= 'a' && c <= 'z'	upper := c >= 'A' && c <= 'Z'	numeric := c >= '0' && c <= '9'	return lower || upper || numeric}func isEqual(a, b byte) bool {	if a >= 'a' && a <= 'z' {		a = a - 'a' + 'A'	}	if b >= 'a' && b <= 'z' {		b = b - 'a' + 'A'	}	return a == b}// func isPalindrome(s string) bool {// 	if len(s) == 0 || len(s) == 1 {// 		return true// 	}// 	for beg, end := 0, len(s)-1; beg < end; {// 		if !isAlphanum(s[beg]) {// 			beg++// 			continue// 		}// 		if !isAlphanum(s[end]) {// 			end--// 			continue// 		}// 		if isEqual(s[beg], s[end]) {// 			beg++// 			end--// 		} else {// 			return false// 		}// 	}// 	return true// }// func main() {// 	fmt.Println(isPalindrome(""))// 	fmt.Println(isPalindrome("How are!! ! rawoh~"))// 	fmt.Println(isPalindrome("0P"))// }
 |