修改 0503.下一个更大元素II go版本中的代码错误

This commit is contained in:
ShuangmingMa
2023-09-16 18:40:07 +08:00
committed by GitHub
parent 4316022814
commit f1a65d7e2d

View File

@ -207,7 +207,7 @@ class Solution:
```go
func nextGreaterElements(nums []int) []int {
length := len(nums)
result := make([]int,length,length)
result := make([]int,length)
for i:=0;i<len(result);i++{
result[i] = -1
}