Skip to content

Instantly share code, notes, and snippets.

@purohit
purohit / LevenshteinDistance.go
Last active December 28, 2015 15:00 — forked from athiwatc/LevenshteinDistance.go
Updating this to work with Go v1
package LevenshteinDistance
import "math"
func compare(a, b string) int {
var cost int
d := make([][]int, len(a)+1)
for i := 0; i < len(d); i++ {
d[i] = make([]int, len(b)+1)
}