Easy Java O(n) solution


#1
public class Solution {
public int coverPoints(int[] a, int[] b) {
    int count=0;
    for(int i=1;i<a.length;i++)
        count+=Math.max(Math.abs(a[i]-a[i-1]),Math.abs(b[i]-b[i-1]));
    return count;
}
}