Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit54e6a78

Browse files
refactor 941
1 parentb272ffa commit54e6a78

File tree

1 file changed

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

1 file changed

+0
-32
lines changed

‎src/main/java/com/fishercoder/solutions/_941.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,5 @@
11
packagecom.fishercoder.solutions;
22

3-
/**
4-
* 941. Valid Mountain Array
5-
*
6-
* Given an array A of integers, return true if and only if it is a valid mountain array.
7-
*
8-
* Recall that A is a mountain array if and only if:
9-
*
10-
* A.length >= 3
11-
* There exists some i with 0 < i < A.length - 1 such that:
12-
* A[0] < A[1] < ... A[i-1] < A[i]
13-
* A[i] > A[i+1] > ... > A[B.length - 1]
14-
*
15-
*
16-
* Example 1:
17-
*
18-
* Input: [2,1]
19-
* Output: false
20-
* Example 2:
21-
*
22-
* Input: [3,5,5]
23-
* Output: false
24-
* Example 3:
25-
*
26-
* Input: [0,3,2,1]
27-
* Output: true
28-
*
29-
*
30-
* Note:
31-
*
32-
* 0 <= A.length <= 10000
33-
* 0 <= A[i] <= 10000
34-
* */
353
publicclass_941 {
364
publicstaticclassSolution1 {
375
publicbooleanvalidMountainArray(int[]A) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp