LeetCode-55-Jump Game 贪心水题
来源:互联网 发布:fifa online3新数据库 编辑:程序博客网 时间:2024/05/16 12:25
class Solution(object): def canJump(self, nums): """ :type nums: List[int] :rtype: bool """ Len=len(nums) if Len<=1:return True reach=0 for i in range(Len): if i<=reach: reach=max(reach,i+nums[i]) else: return False return True
阅读全文
1 0
- LeetCode-55-Jump Game 贪心水题
- leetCode #55 Jump Game 贪心
- Leetcode 贪心 Jump Game
- [leetcode][贪心] Jump Game
- leetcode---Jump Game---贪心
- leetcode---jump-game---贪心
- LeetCode-55-Jump Game(贪心)-Medium
- Leetcode 贪心 Jump Game II
- [leetcode][贪心] Jump Game II
- LeetCode Jump Game(贪心算法)
- LeetCode Jump Game II(贪心)
- [leetcode]55. Jump Game 贪心
- leetcode 55. Jump Game [贪心]
- LeetCode 55: Jump Game
- [leetcode 55] Jump Game
- LeetCode(55) Jump Game
- [LeetCode 55]Jump Game
- leetcode || 55、Jump Game
- requirejs基础
- 微信小程序登录逻辑整理
- [bzoj1207][dp]打鼹鼠
- Windows builder-可拖拽式编程软件
- HDU-2586 How far away ?(LCA)
- LeetCode-55-Jump Game 贪心水题
- hrbust 1944 皮卡丘
- iOS 代码规范
- 【编程练习】打印1到n位数
- 20170919学习笔记Selenium 2 第一章自动化测试基础
- 用jstl实现表格的隔行换色
- 继承与访问修饰符public, protected, private
- 2.句子逆序
- 十一个行为型模式1:职责链模式-Chain of Responsibility Pattern【学习难度:★★★☆☆,使用频率:★★☆☆☆】