Skip to content

Commit 54b3bbf

Browse files
refactor 665
1 parent 5aa30f6 commit 54b3bbf

File tree

1 file changed

+0
-21
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-21
lines changed

src/main/java/com/fishercoder/solutions/_665.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
package com.fishercoder.solutions;
22

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-
*/
243
public class _665 {
254

265
public static class Solution1 {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy