4 line code in cpp


#1

Comment body goes herint Solution::canJump(vector &A) {
int reach_point = 0;
int i;
for(i=0;i<A.size() && reach_point>=i;i++){
reach_point = max(reach_point,A[i]+i);

}
return i==A.size();

}
e.