Find the length of the longest contiguous arithmetic progression subarray when you may change at most one element.
Unlock detailed company stats for this questionUpgrade
For [8, 5, 2, 1, 100], changing 1 to -1 gives [8, 5, 2, -1] with length 4.
Community answers
No answers contributed by the community yet.
Related questions
Given a binary sequence, find the length of the longest contiguous subarray containing at most K 1s.Find the maximum sum of any contiguous subarray having length at most K.Given an array of integers and a number N, find the length of the longest contiguous subarray such that the difference between any two elements in the subarray is less than N.Related courses

Course

Course
Course
