
162. Find Peak Element
·
Algorithm
Find Peak Element - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 정수 배열이 주어진다. 주어진 배열을 산의 높이라고 생각하고 Peek의 index를 반환하는 문제다. 산에는 여러 개의 Peek가 있을 수 있고 이런 경우는 조건에 해당하는 여러 개의 index 중 하나를 반환하면 된다. 예시 Input: nums = [1,2,3,1] Output: 2 Explanation: 3 is a peak element and your function sh..