Longest Non-Decreasing Run After One Change
Asked at Google
Reported by the problem's creator, not verified
You are given an array of integers nums.
Examples
Example 1
Input: nums =
[1,0,3,4,5,2,3]Output:
5Explanation: Change the
0to1,2or3; then[1, 2, 3, 4, 5]is non-decreasing with length 5. No single change also brings in the trailing2, 3.
Import your own questions
Paste a question you were asked and get a full problem: statement, tests and a checked solution.