replaced 1 << 31 - 1 with math.MaxInt32

This commit is contained in:
alexchao26
2020-08-12 20:45:56 -04:00
parent a2492f9f4b
commit 06e9e53f49
10 changed files with 21 additions and 43 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ import (
"adventofcode/util"
"fmt"
"log"
"math"
"strconv"
"strings"
)
@@ -398,7 +399,7 @@ removeColsLeft:
// findShortestLength is a (fairly) standard brute force searching algorithm that will return the shortest path from origin to the O2 tank (cell with a 2)
func findShortestLength(grid [][]int, startX, startY int) int {
shortestLength := util.MaxSafeInt
shortestLength := math.MaxInt32
var recurse func(x, y, pathLength int)
recurse = func(x, y, pathLength int) {