Data type conversion problem for leetcode pratice "Moving Average from Data Stream"
When I was running the code for the leetcode question ""Moving Average from Data Stream"". I got a partly different output with the expected: Here is my code: class MovingAverage { int front = 0, rear = 0; Double sum = 0.00000; int[] data; public MovingAverage(int size) { data = new int[size]; Arrays.fill(data, 0); }… Read More Data type conversion problem for leetcode pratice "Moving Average from Data Stream"