Moving Average from Data Stream: 346 - Design interview question -google,apple,amazon,meta,microsoft

  Рет қаралды 643

Destination FAANG

Destination FAANG

Күн бұрын

Пікірлер: 4
@DestinationFAANG
@DestinationFAANG 2 жыл бұрын
Most asked problems at FAANG companies: docs.google.com/spreadsheets/d/1hzP8j7matoUiJ15N-RhsL5Dmig8_E3aP/edit#gid=1377915986 Leetcode Link: leetcode.com/problems/moving-average-from-data-stream/ **************** Java Solution *********************** class MovingAverage { int size, windowSum = 0, count = 0; Deque queue = new ArrayDeque(); public MovingAverage(int size) { this.size = size; } public double next(int val) { ++count; // calculate the new sum by shifting the window queue.add(val); int tail = count > size ? (int)queue.poll() : 0; windowSum = windowSum - tail + val; return windowSum * 1.0 / Math.min(size, count); } }
@depression_plusplus6120
@depression_plusplus6120 2 жыл бұрын
Need more from you sir🙏🙏...please make video on fresher students and what you advice for them
@DestinationFAANG
@DestinationFAANG 2 жыл бұрын
Currently I am on vacation, so its hard to make videos right now. But I will try to be more consistent soon. Thanks.
@depression_plusplus6120
@depression_plusplus6120 2 жыл бұрын
@@DestinationFAANG no problem sir. Enjoy your time. But please please please, do make a advice video for novices like us
How I Failed the Google Coding Interview (and lessons I learned)
14:24
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Moving Average from Data Stream
5:59
Kevin Naughton Jr.
Рет қаралды 31 М.
System Design Interview - Top K Problem (Heavy Hitters)
36:18
System Design Interview
Рет қаралды 384 М.
How to get a Developer Job - in this economy
27:10
Destination FAANG
Рет қаралды 1,5 М.
Google's toughest interview question - Burst Balloons: 312
26:06
Destination FAANG
Рет қаралды 801
How to: Work at Google - Example Coding/Engineering Interview
24:02
Life at Google
Рет қаралды 7 МЛН
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 288 М.
Moving Average for Python in 6 mins
6:59
James Cutajar
Рет қаралды 9 М.
Medium Google Coding Interview With Ben Awad
51:27
Clément Mihailescu
Рет қаралды 1,3 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН