Tap here to switch tabs
Problem
Submissions

Problem: Count Subarrays With Cost Less Than or Equal to K

med
30 min
Try to solve the Count Subarrays With Cost Less Than or Equal to K problem.

Statement

You are given an integer array nums and an integer k.

The cost of a subarray is defined as the product of the difference between its maximum and minimum elements and its length:

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Subarrays With Cost Less Than or Equal to K

med
30 min
Try to solve the Count Subarrays With Cost Less Than or Equal to K problem.

Statement

You are given an integer array nums and an integer k.

The cost of a subarray is defined as the product of the difference between its maximum and minimum elements and its length: