You are given an array of integers nums of length n and a positive integer k.
The power of an array is defined as:
Its maximum element if all of its elements are consecutive and sorted in ascending order (meaning each adjacent element differs by exactly
Return an array of integers results of size n k results[i] is the power of the subarray of size k starting at index i.
Constraints:
nums.length
nums[i]
You are given an array of integers nums of length n and a positive integer k.
The power of an array is defined as:
Its maximum element if all of its elements are consecutive and sorted in ascending order (meaning each adjacent element differs by exactly
Return an array of integers results of size n k results[i] is the power of the subarray of size k starting at index i.
Constraints:
nums.length
nums[i]