C++ Easiest Solution


#1

int Solution::coverPoints(vector &A, vector &B) **
{
** int i=0;

** int ans=0;**
** while(i!=A.size()-1)**
** {**
** int p=max(abs(A[i+1]-A[i]),abs(B[i+1]-B[i]));**
** ans=ans+p;**
** i++;**
** }**
** return abs(ans);**
}