We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5aa30f6 commit 54b3bbfCopy full SHA for 54b3bbf
src/main/java/com/fishercoder/solutions/_665.java
@@ -1,26 +1,5 @@
1
package com.fishercoder.solutions;
2
3
-/**
4
- * 665. Non-decreasing Array
5
- *
6
- * Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.
7
-
8
- We define an array is non-decreasing if array[i] <= array[i + 1] holds for every i (1 <= i < n).
9
10
- Example 1:
11
12
- Input: [4,2,3]
13
- Output: True
14
- Explanation: You could modify the first 4 to 1 to get a non-decreasing array.
15
16
- Example 2:
17
18
- Input: [4,2,1]
19
- Output: False
20
- Explanation: You can't get a non-decreasing array by modify at most one element.
21
22
- Note: The n belongs to [1, 10,000].
23
- */
24
public class _665 {
25
26
public static class Solution1 {
0 commit comments