
इस वीडियो को देखने के लिए सदस्यता आवश्यक है।
leetcode - 346 Moving Average from Data Stream
690 विचारों
ram256
09/10/24
like and subscribe!
Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window.
Implement the MovingAverage class:
MovingAverage(int size) Initializes the object with the size of the window size.
double next(int val) Returns the moving average of the last size values of the stream.
0:05 Problem Overview
4:59 - Solution 1 Easy
14:14 - Solution 2 - Optimization 1
20:43 - Solution 3 - Optimization 2
25:42 - Solution 4 - Optimization 3
-
श्रेणी
और दिखाओ
कोई टिप्पणी नहीं मिली