max_length and current_length to 0.i.nums[i] is even and nums[i] <= threshold, check if it can start or extend a subarray:
i is 0 or nums[i-1] is odd, set current_length to 1.current_length.nums[i] is odd and nums[i] <= threshold, check if it can extend a subarray:
nums[i-1] is even, increment current_length.current_length.max_length with the maximum of max_length and current_length.nums[i] > threshold, reset current_length.max_length as the result.