摘要: https://leetcode.cn/problems/koko-eating-bananas/description/ 二段性:速度有得完和不吃完两个段关键点是编写check函数,比较繁杂 class Solution { public int minEatingSpeed(int[] pile 阅读全文
posted @ 2024-09-27 15:40 风乐 阅读(13) 评论(0) 推荐(0)
摘要: https://leetcode.cn/problems/find-peak-element/description/ class Solution { public int findPeakElement(int[] nums) { // 需要依据题意来证明一个定理 // i~n-1中切nums[ 阅读全文
posted @ 2024-09-27 02:05 风乐 阅读(16) 评论(0) 推荐(0)