This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!
Submit FeedbackWas a fun challenge! My interpretation of the problem was that each vertex of the triangle cannot share a longitude or latitude with any other vertex of that same triangle. I think that's the literal definition of non-collinear.
For my solution, it actually appeared that the furthest northeastern point and the furthest southeastern point lie on the same longitude. However, after checking the points themselves, this wasn't the case, so that is a valid triangle (non-collinear).
Lastly, I was concerned about comparing the different values for the longitudes/latitudes as the precision of a double might not be precise enough to equate two lats/longs. After checking the documentation, the datatype double is accurate up to 15 digits precision. Every data point is within this precision.
Solution below: