2
* @param {number[]} nums3
* @param {number} threshold6
var validSubarraySize = function (nums, threshold) {8
Approach: Use monotonous increasing array11
for (let i = 0; i < nums.length; i++) {13
while (stack.length > 0 && stack[stack.length - 1][0] > nums[i]) {14
let popped = stack.pop();16
let len = i - popped[1];17
if (min > threshold / len) {22
stack.push([nums[i], start]);24
let end = nums.length - 1;25
for (let i = 0; i < stack.length; i++) {26
let len = end - stack[i][1] + 1;27
let min = stack[i][0];28
if (min > threshold / len) {