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 its elements are consecutive and sorted in ascending order.
Return an array of integers representing the power of every subarray of nums of size k, ordered from the first subarray to the last.
Constraints:
n nums.length
nums[i]
k n
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 its elements are consecutive and sorted in ascending order.
Return an array of integers representing the power of every subarray of nums of size k, ordered from the first subarray to the last.
Constraints:
n nums.length
nums[i]
k n