题目:
代码(首刷自解 2024年2月9日):
class Solution {
public:bool canJump(vector<int>& nums) {int noz = 0;for (int i = nums.size() - 2; i >= 0; --i) {if (nums[i] == 0) {noz++;continue;} else {if (nums[i] > noz) noz = 0;else {noz++;continue;}}}return noz == 0 ? true : false;}
};