This commit is contained in:
2025-09-15 21:12:04 +08:00
commit 3f58f483ff
144 changed files with 5298 additions and 0 deletions

12
25/06/3423.go Normal file
View File

@@ -0,0 +1,12 @@
package main
import "math"
func maxAdjacentDistance(nums []int) int {
n := len(nums)
max := int(math.Abs(float64(nums[0] - nums[n-1])))
for i := 0; i < n-1; i++ {
max = int(math.Max(float64(max), float64(math.Abs(float64(nums[i]-nums[i+1])))))
}
return max
}