Longest non-decreasing subarray after changing one element

0
Remix
  1. Warm-up: return the length of the longest run of consecutive elements that is strictly increasing.
  2. Given an integer array, return the longest contiguous non-decreasing subarray you can get after changing at most one element to any integer you like (or changing none).
GoogleCodingLast asked Aug 2026
No answer yet. Write the first one; the best answer gets endorsed.