res += Math.max(Math.abs(p[i][0] - p[i-1][0]), Math.abs(p[i][1] - p[i-1][1])); ...
On a 2D plane, there are n points with integer coordinates points[i] = [xi, yi]. Return the minimum time in seconds to visit all the points in the order given by points. move diagonally sqrt(2) units ...