Finding the maximum frequency in a window in a stream without minimum window size restriction