Count Subarrays With Max Element Constraint
Given an integer array `nums` and an integer `k`, return the number of subarrays where the maximum element in the subarray is equal to `k`.
Given an integer array `nums` and an integer `k`, return the number of subarrays where the maximum element in the subarray is equal to `k`.