Find minimum in a sliding window in integer array

O(N) solution. Each element is Inserted and deleted at most once, hence
2N time complexity.