LeetCode MEDIUM 3738 Longest Non-Decreasing Subarray After Replacing at Most One Element Summary
Generated by Codex with GPT 5.6 Sol XHigh
Quick facts
- Difficulty:
MEDIUM - Problem: Longest Non-Decreasing Subarray After Replacing at Most One Element
- Topics:
Array,Dynamic Programming
Problem gist
Given an integer array, one element may be replaced with any integer. The goal is to maximize the length of a contiguous subarray whose values never decrease from left to right.
Continue ...