Skip to content

Commit

Permalink
manhattan not minkowski haha
Browse files Browse the repository at this point in the history
  • Loading branch information
JBorrow committed Dec 11, 2023
1 parent ea2df43 commit 051f2f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions day-11/part1.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func intAbs(x int) int {
return x
}

func minkowski_norm(a Galaxy, b Galaxy) int {
func manhattan_norm(a Galaxy, b Galaxy) int {
return intAbs(a.x-b.x) + intAbs(a.y-b.y)
}

Expand Down Expand Up @@ -62,7 +62,7 @@ func all_pair_distances(galaxies []Galaxy) []int {
continue
}

distances = append(distances, minkowski_norm(a, b))
distances = append(distances, manhattan_norm(a, b))
}
}

Expand Down

0 comments on commit 051f2f9

Please sign in to comment.