2022 Day 15, part 1 complete
Going home from C&C
This commit is contained in:
@@ -416,3 +416,7 @@ func Sum(l, h int) int {
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func ManhattanDistance(x1, y1, x2, y2 int) int {
|
||||
return AbsInt(x1-x2) + AbsInt(y1-y2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user