TikTok Interview Question

Sliding window leetcode hard problem