diff options
author | rsiddharth <s@ricketyspace.net> | 2020-09-05 10:39:46 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2020-09-05 10:39:46 -0400 |
commit | 44f0fd653e2fa0fd2e0a4d067a335bba2cd21525 (patch) | |
tree | 0062528f2506661fc759a2b17f1ef561f2498adc | |
parent | aa9f08f51abee3e0857d82f3d45ec3bd58420de7 (diff) |
lib: update HammingDistance
lib/hamming.go (HammingDistance): Change type of arguments to []byte.
-rw-r--r-- | lib/hamming.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hamming.go b/lib/hamming.go index b2c46e9..1e53d54 100644 --- a/lib/hamming.go +++ b/lib/hamming.go @@ -9,7 +9,7 @@ func init() { rand.Seed(42) } -func HammingDistance(a, b string) int { +func HammingDistance(a, b []byte) int { if len(a) != len(b) { return -1 // Fail. } |