Subarrays With Product Below K
Medium · rating 1500 · Sliding Window, Two Pointers
The first line has n and k. The second line has n positive integers. Print the number of contiguous subarrays whose product is strictly less than k.
Constraints: 1 ≤ n ≤ 105, 1 ≤ k ≤ 109
Related problems
- Minimum Size Subarray Sum — Medium
- Subarray With Target Sum — Medium
- Container With Most Water — Medium
- Longest Substring Without Repeats — Medium
- Maximum Window Sum — Medium
- Sort Colors — Medium