func Distance(a, b string) (int, error) {
	var hammingDistance int
	if len(a) != len(b) {
		return hammingDistance, fmt.Errorf("%s and %s are different lengths", a, b)
	}
	for i := 0; i < len(a); i++ {
		if a[i] != b[i] {
			hammingDistance++
		}
	}
	return hammingDistance, nil
}
// Distance takes two strings and returns their Hamming distance. Returns error if strings are of different lengths.
Distance takes two strings and returns their Hamming distance. Returns error if strings are of different lengths.
// Distance takes two strings and returns their Hamming distance . Returns error if strings are of different lengths .
func Distance(a, b string) (int, error) {
	var hammingDistance int
	if len(a) != len(b) {
		return hammingDistance, fmt.Errorf("%s and %s are different lengths", a, b)
	}
	for i := 0; i < len(a); i++ {
		if a[i] != b[i] {
			hammingDistance++
		}
	}
	return hammingDistance, nil
}
func Distance ( a , b string ) ( int , error ) { var hammingDistance int if len ( a ) != len ( b ) { return hammingDistance , fmt . Errorf ( " " , a , b ) } for i := 0 ; i < len ( a ) ; i ++ { if a [ i ] != b [ i ] { hammingDistance ++ } } return hammingDistance , nil }
Distance takes two strings and returns their Hamming distance.
Distance takes two strings and returns their Hamming distance .