| 123456789101112131415161718192021 | func nextGreaterElement(findNums []int, nums []int) []int {	stack := make([]int, 0) // Keep a decease stack	next := make(map[int]int)	for _, i := range nums {		for l := len(stack); l != 0 && stack[l-1] < i; l = len(stack) {			top := stack[l-1]			stack = stack[:l-1]			next[top] = i		}		stack = append(stack, i)	}	res := make([]int, len(findNums))	for i := range res {		if val, ok := next[findNums[i]]; ok {			res[i] = val		} else {			res[i] = -1		}	}	return res}
 |