Longest Non-Decreasing Subarray With One Replacement

Longest Non-Decreasing Subarray With One Replacement

Given an integer array nums, you may change at most one element to any integer value. You may also choose not to make any change.

Return...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: