Coding · Medium · ProDeque for sliding window maximumCodingCollectionsSeniorModel answerPreviewApproachClarify constraints and edge cases for: Deque for sliding window maximum.Choose appropriate data structure; state time/space…