We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73b7281 commit e0d0bcaCopy full SHA for e0d0bca
src/main/java/com/fishercoder/solutions/_941.java
@@ -37,9 +37,9 @@ public static class Solution1 {
37
public boolean validMountainArray(int[] A) {
38
int i = 0;
39
for (; i < A.length - 1; i++) {
40
- if (A[i] < A[i+1]) {
+ if (A[i] < A[i + 1]) {
41
continue;
42
- } else if (A[i] == A[i+1]) {
+ } else if (A[i] == A[i + 1]) {
43
return false;
44
} else {
45
break;
@@ -48,8 +48,8 @@ public boolean validMountainArray(int[] A) {
48
if (i == 0 || i >= A.length - 1) {
49
50
}
51
- for (; i < A.length-1; i++) {
52
- if (A[i] > A[i+1]) {
+ for (; i < A.length - 1; i++) {
+ if (A[i] > A[i + 1]) {
53
54
55
0 commit comments