Documentation
¶
Overview ¶
https://leetcode-cn.com/problems/moving-average-from-data-stream/
346. 数据流中的移动平均值
给定一个整数数据流和一个窗口大小,根据该滑动窗口的大小,计算其所有整数的移动平均值。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MovingAverage ¶
type MovingAverage struct {
// contains filtered or unexported fields
}
方法一:
时间复杂度: 空间复杂度:
func (*MovingAverage) Next ¶
func (this *MovingAverage) Next(val int) float64
Click to show internal directories.
Click to hide internal directories.