TikTok Interview Question

Sliding window, Monotone stack, backtrack, fixed array