Skip to content

Instantly share code, notes, and snippets.

View briandowns's full-sized avatar

Brian Downs briandowns

  • Phoenix, AZ
View GitHub Profile
@briandowns
briandowns / go_hamming_distance
Created October 22, 2014 02:07
Go Hamming Distance
package main
import (
"errors"
"log"
)
func getDistance(s1, s2 string) (int, error) {
if len(s1) != len(s2) {
return 0, errors.New("ERROR: Strings are of different lengths")