Freshworks Interview Question

Given an integer Stream, Find average of k last seen numbers in a stream in java.

Interview Answer

Anonymous

Jan 28, 2021

Iterate back to the count of the given number from end of the stream. And add.