修改目录名称

This commit is contained in:
2025-08-19 03:50:15 +08:00
parent 98a0c7d04e
commit 2eb2d2bedc
8 changed files with 167 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
package main
func main() {
}
func maxArea(height []int) int {
left := 0
right := len(height) - 1
maxscore := 0
for left < right {
temp := min(height[left], height[right]) * (right - left)
if temp > maxscore {
maxscore = temp
}
if height[left] < height[right] {
left++
} else {
right--
}
}
return maxscore
}