Subarray With Elements Greater Than Varying Threshold at TikTok

Hard45.2% acceptance

This problem has 87.5% frequency at TikTok.

Problem Description

You are given an integer array `nums` and an integer `threshold`. Find any subarray of `nums` of length `k` such that **every** element in the subarray is **greater** than `threshold / k`. Return _the**size** of **any** such subarray_. If there is no such subarray, return `-1`. A **subarray** is...

Read full problem and hints

Topics

Also asked at 3 companies


More TikTok Questions

View all TikTok questions