[LeetCode]45. 跳跃游戏 II

贪心 每次跳跃的落点选择将来(下一跳)能跳最远的位置,容易证实这样的跳跃方案就是最优的。 45. 跳跃游戏 IIweb class Solution { public: int jump(vector<int>& nums) { int tip=nums[0]; int len=nums.size(); int now=0;
相关文章
相关标签/搜索