Search⌘ K
AI Features

Solution: Subarray With Elements Greater Than Varying Threshold

C# solution for the Subarray With Elements Greater Than Varying Threshold problem using the Stacks pattern.

Statement

You are given an integer array nums and an integer threshold. Return the size k of any non empty contiguous subarray such that every element in that subarray is strictly greater than threshold / k.

If no such subarray exists, return 1-1.

Note: If multiple subarrays satisfy the condition, you may return the size of any one of them.

Constraints:

  • 11 \leq ...