会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
我是SSP
博客园
首页
新随笔
联系
订阅
管理
2020年5月12日
leetcode 605 种花问题 贪心算法
摘要: 这道题就是苹果数一定的情况下,能不能满足一定数量孩子的胃口。(这里可以参见上一个博文)典型的贪心算法。 class Solution { public boolean canPlaceFlowers(int[] flowerbed, int n) { int count=0; for(int i=0
阅读全文
posted @ 2020-05-12 18:04 我是SSP
阅读(275)
评论(0)
推荐(0)
编辑
公告