MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Method main

Java/Leetcode/Leetcode852.java:4–8  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

2
3public class Leetcode852 {
4 public static void main(String[] args) {
5 int arr[]={2,5,7,9,8,6,2,1};
6 int ans=peakIndex(arr);
7 System.out.println(arr[ans]);
8 }
9 static int peakIndex(int[] arr) {
10 int start = 0;
11 int end = arr.length - 1;

Callers

nothing calls this directly

Calls 1

peakIndexMethod · 0.95

Tested by

no test coverage detected