Skip to content

Commit da0ff4c

Browse files
committed
find_the_highest_altitude_1732: rename var
1 parent 8d441d4 commit da0ff4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

find_the_highest_altitude_1732/solution.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ func largestAltitude(gain []int) int {
1818
}
1919

2020
// catch is that zero starting point could be the highest altitude
21-
max := 0
21+
highest := 0
2222
for _, s := range prefixSums {
23-
max = int(math.Max(float64(max), float64(s)))
23+
highest = int(math.Max(float64(highest), float64(s)))
2424
}
25-
return max
25+
return highest
2626
}

0 commit comments

Comments
 (0)