Skip to content

Commit aebb84b

Browse files
refactor 852
1 parent 5b8c58d commit aebb84b

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/_852.java

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

3-
/**852. Peak Index in a Mountain Array
4-
*
5-
* Let's call an array A a mountain if the following properties hold:
6-
*
7-
* A.length >= 3
8-
* There exists some 0 < i < A.length - 1 such that A[0] < A[1] < ... A[i-1] < A[i] > A[i+1] > ... > A[A.length - 1]
9-
* Given an array that is definitely a mountain, return any i such that A[0] < A[1] < ... A[i-1] < A[i] > A[i+1] > ... > A[A.length - 1].
10-
*
11-
* Example 1:
12-
*
13-
* Input: [0,1,0]
14-
* Output: 1
15-
* Example 2:
16-
*
17-
* Input: [0,2,1,0]
18-
* Output: 1
19-
* Note:
20-
*
21-
* 3 <= A.length <= 10000
22-
* 0 <= A[i] <= 10^6
23-
* A is a mountain, as defined above.*/
243
public class _852 {
254
public static class Solution1 {
265
public int peakIndexInMountainArray(int[] A) {

0 commit comments

Comments
 (0)