sliding window max: priority queue based solution