Practice Adjacent Increasing Subarrays Detection I
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given nums and k, return whether there are indices a and b = a + k such that both length-k subarrays starting at a and b are strictly increasing. The two subarrays must be adjacent and fit within nums.
Source: Adjacent Increasing Subarrays Detection I on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
nums = [2,5,7,8,9,2,3,4,3,1], k = 3
Output
true
# Example 2
Input
nums = [1,2,3,4,4,4,4,5,6,7], k = 5
Output
false
Constraints
2 <= nums.length <= 100
1 < 2 * k <= nums.length
-1000 <= nums[i] <= 1000
Related LeetCode Problems
Practice more problems similar to Adjacent Increasing Subarrays Detection I.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.