Sliding window maximum
- Given an array and a window size
k, return the maximum of every window ofkconsecutive elements. - As a class:
put(number)adds a number to a stream andgetMax()returns the largest of the lastknumbers put.
No answer yet. Write the first one; the best answer gets endorsed.
