Google | Phone | Average of K numbers in a stream

Got this problem in hangout round.

The average value of the last last k value is required, and in the calculation,
it is required to remove top5% and bottom5% of the k numbers.

public class Stream {

	public Stream(int k) {

	}

	public void add(int val) {

	}

	public Double getAvarage() {

	}
}
Comments (11)