You are given an integer array nums and an integer k.
A subarray of nums is called prime gap balanced if:
It contains at least
The difference between the maximum prime number and the minimum prime number in the subarray is at most k.
Return the total number of prime gap balanced subarrays in nums.
Note: A subarray is a contiguous non empty sequence of elements within an array.
Constraints:
nums.length
nums[i]
k
You are given an integer array nums and an integer k.
A subarray of nums is called prime gap balanced if:
It contains at least
The difference between the maximum prime number and the minimum prime number in the subarray is at most k.
Return the total number of prime gap balanced subarrays in nums.
Note: A subarray is a contiguous non empty sequence of elements within an array.
Constraints:
nums.length
nums[i]
k