Sliding Window Maximum

00:00
HardSee topic tags for pattern hints
AmazonGoogle

Implement Sliding window maximum using deque. Return the expected result as described.

Examples

Input → Ex1: See problem description for sample input/output.
Output →
Input → Ex2: Edge case: empty or single element input.
Output →