nums. An array is strictly increasing when each element after the first is larger than the one before it.
Can you delete exactly one element from nums so that what remains is strictly increasing? If nums is already strictly increasing, the answer is true.
Return true or false.nums=[4, 6, 5, 8] → True
Removing 6 gives [4, 5, 8], where every number is larger than the one before it.
nums=[5, 4, 3] → False
There are two drops in a row; whichever element goes, one drop remains.
nums=[1, 2, 3] → True
The array already strictly increases, and it still does after removing any element.
nums.length ≤ 10⁵nums[i] ≤ 10⁵nums=[4, 6, 5, 8]
True
Run checks the first 3 tests in your browser. Submit checks all 181 tests on the server, hidden ones included.