162
-
[LeetCode] 162. Find Peak ElementLeetCode 2021. 7. 13. 22:20
https://leetcode.com/problems/find-peak-element/ 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 Find Peak Element. 말 그대로 int 배열 중 피크점의 index를 찾아주면 된다. peak는 여러개 있을 수 있는데 아무거나 찾아주면 된다. 간단하게는 왼쪽 오른쪽보다 높은 값의 index를 return하면 된다. 그렇다면 왼쪽이 없는 첫번째와 오른쪽이 없는 마지막은? -1과 마..