Count Subarrays Where Max Element Appears at Least K Times
You are given an integer array `nums` and a **positive** integer `k`.
Return *the number of subarrays where the **maximum** element of* `nums` *appears **at least*** `k` *times in that subarray.*
A **subarray** is a contiguous sequence of elements within an array.
30:00
Count Subarrays Where Max Element Appears at Least K Times