Skip to content

Instantly share code, notes, and snippets.

@udhos
Last active August 21, 2019 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save udhos/ab71d42a4ffeb674b2c41cbb2e4903a5 to your computer and use it in GitHub Desktop.
Save udhos/ab71d42a4ffeb674b2c41cbb2e4903a5 to your computer and use it in GitHub Desktop.
hamming distance
{
s1: "aaa",
s2: "aÃa",
want: 1,
expectError: false,
},
{
s1: "aáa",
s2: "aãa",
want: 1,
expectError: false,
},
{
s1: "oá",
s2: "íá",
want: 1,
expectError: false,
},
- x := len(one_string) // x in bytes or runes ?
- for i,c := range one_string { // c is byte or rune ?
- c := one_string[0] // c is byte or rune ?
- How to build a slice of runes from a string?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment