We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The question doesn't make clear that the points are already in counterclockwise order. I was staring at the problem for a while wondering how I'm suppose to order the list of points until I looked and saw that the other solutions didn't do anything special (besides calculate the distance between the points and sum them together).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Compute the Perimeter of a Polygon
You are viewing a single comment's thread. Return to all comments →
The question doesn't make clear that the points are already in counterclockwise order. I was staring at the problem for a while wondering how I'm suppose to order the list of points until I looked and saw that the other solutions didn't do anything special (besides calculate the distance between the points and sum them together).