moving_average_from_data_stream

package
v0.0.0-...-a70e5fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 0 Imported by: 0

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 ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

type MovingAverage

type MovingAverage struct {
	// contains filtered or unexported fields
}

方法一:

时间复杂度: 空间复杂度:

func Constructor

func Constructor(size int) MovingAverage

* Initialize your data structure here.

func (*MovingAverage) Next

func (this *MovingAverage) Next(val int) float64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL