题目: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its index. The array may contain multiple peaks,
力扣每日一题 题目:162. 寻找峰值 日期:2023-12-18 用时:10 m 9 s 时间:0 ms 内存:40.54 MB 代码: class Solution {public int findPeakElement(int[] nums) {if(nums.length==1){return 0;}if(nums.length==2){return nums[0]>nums[1]?