LeetCode题解-739

Published: by Creative Commons Licence

题目:

Daily Temperatures

解答:

func dailyTemperatures(T []int) []int {
	length := len(T)
	list := make([]int, length)
	for i := 0; i < length-1; i ++ {
		find := false
		j := 0
		for j = i + 1; j < length; j ++ {
			if T[j] <= T[i] {
				continue
			} else {
				find = true
				break
			}
		}
		if find {
			list[i] = j - i
		} else {
			list[i] = 0
		}
	}
	// 最后一位始终为0
	list[length-1] = 0
	return list
}

简单的中等题,解法比较粗暴……

项目:

P5+

正则项,评估(问了),wide & deep,

写代码?

LR的代码?

wide & deep? 协同过滤?