Skip to content

Commit 593ee91

Browse files
refactor 896
1 parent ca454bf commit 593ee91

File tree

1 file changed

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

1 file changed

+0
-35
lines changed

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

-35
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 896. Monotonic Array
5-
*
6-
* An array is monotonic if it is either monotone increasing or monotone decreasing.
7-
*
8-
* An array A is monotone increasing if for all i <= j, A[i] <= A[j].
9-
* An array A is monotone decreasing if for all i <= j, A[i] >= A[j].
10-
*
11-
* Return true if and only if the given array A is monotonic.
12-
*
13-
* Example 1:
14-
* Input: [1,2,2,3]
15-
* Output: true
16-
*
17-
* Example 2:
18-
* Input: [6,5,4,4]
19-
* Output: true
20-
*
21-
* Example 3:
22-
* Input: [1,3,2]
23-
* Output: false
24-
*
25-
* Example 4:
26-
* Input: [1,2,4,5]
27-
* Output: true
28-
*
29-
* Example 5:
30-
* Input: [1,1,1]
31-
* Output: true
32-
*
33-
* Note:
34-
*
35-
* 1 <= A.length <= 50000
36-
* -100000 <= A[i] <= 100000
37-
*/
383
public class _896 {
394
public static class Solution1 {
405
public boolean isMonotonic(int[] A) {

0 commit comments

Comments
 (0)