From 5087324564a526266aad9b2127d64c1a54bf25f1 Mon Sep 17 00:00:00 2001 From: seaskymonster Date: Sat, 1 Oct 2016 01:07:32 -0700 Subject: [PATCH] [239. Sliding Window Maximum][Accepted]committed by LeetCode Extension --- 239-Sliding-Window-Maximum/solution.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/239-Sliding-Window-Maximum/solution.java b/239-Sliding-Window-Maximum/solution.java index 8f6e642..ef2d893 100644 --- a/239-Sliding-Window-Maximum/solution.java +++ b/239-Sliding-Window-Maximum/solution.java @@ -1,6 +1,6 @@ public class Solution { public void addElement(Deque dq, int element){ - while(!dq.isEmpty() && dq.peekLast() <= element){ + while(!dq.isEmpty() && dq.peekLast() < element){ dq.pollLast(); } dq.offerLast(element);