Hackerrank – Compute the Perimeter of a Polygon
Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution Calculate a length of a line between each pair of following points p, defined with x and y coordinate: (p0, p1), (p1, p2), …, (pn-1, p0) Length of a line between two points: $$l = \sqrt{{(x_1 – x_2)}^2 + {(y_1 […]