Jump Game Array Time : Space : 12345678910int Solution::canJump(vector<int> &A) { int p = 0, ma = 0, n = A.size(); while(p <= ma and p < n) { ma = max(ma, A[p] + p); if(ma > p) p++; else break; } return p >= n - 1;}