Very simple java solution


#1

public class Solution {
public int coverPoints(ArrayList A, ArrayList B) {
int count=0;
int idx=A.get(0);
int idy=B.get(0);
for(int i=1;i<A.size();i++){

        int diffx=A.get(i)-idx;
        int diffy=B.get(i)-idy;
        int diff=Math.max(Math.abs(diffx),Math.abs(diffy));
        
            count+=diff;
            idx=A.get(i);
            idy=B.get(i);
       
    }
    return count;
}

}