Tap here to switch tabs
Problem
Submissions

Problem: Adjacent Increasing Subarrays Detection I

med
30 min
Try to solve the Adjacent Increasing Subarrays Detection I problem.

Statement

Given an array of integers nums and an integer k, determine whether there exist 22 adjacent subarrays of length k that are both strictly increasing.

Specifically, check if there is an index i such that both the subarray nums[i … i + k - 1] and the subarray nums[i + k … i + 2 * k - 1] are strictly increasing.

Return true if such adjacent subarrays exist, and false otherwise.

Constraints:

  • 2≤2 \leq nums.length ≤100\leq 100

  • 1<2imes1 < 2 imes k ≤\leq nums.length

  • −1000≤-1000 \leq nums[i] ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Adjacent Increasing Subarrays Detection I

med
30 min
Try to solve the Adjacent Increasing Subarrays Detection I problem.

Statement

Given an array of integers nums and an integer k, determine whether there exist 22 adjacent subarrays of length k that are both strictly increasing.

Specifically, check if there is an index i such that both the subarray nums[i … i + k - 1] and the subarray nums[i + k … i + 2 * k - 1] are strictly increasing.

Return true if such adjacent subarrays exist, and false otherwise.

Constraints:

  • 2≤2 \leq nums.length ≤100\leq 100

  • 1<2imes1 < 2 imes k ≤\leq nums.length

  • −1000≤-1000 \leq nums[i] ≤1000\leq 1000