1. 题目介绍
https://leetcode-cn.com/problems/jump-game/
2. 解题代码
public bool CanJump(int[] A) {
int n=A.Length;
bool[] f=new bool[n];
f[0]=true;
for (int i = 1; i < n; i++)
{
f[i]=false;
for (int j = 0; j < i; j++)
{
if(f[j]&&j+A[j]>=i)
{
f[i]=true;
break;
}
}
}
return f[n-1];
}